1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add game speed controls to the embedded game window

This commit is contained in:
DexterFstone
2025-06-07 21:47:43 -07:00
parent abbe792575
commit 7ddce8ab26
10 changed files with 173 additions and 11 deletions

View File

@@ -49,8 +49,8 @@ constexpr double HINGE_DEFAULT_RELAXATION = 1.0;
double estimate_physics_step() {
Engine *engine = Engine::get_singleton();
const double step = 1.0 / engine->get_physics_ticks_per_second();
const double step_scaled = step * engine->get_time_scale();
const double step = 1.0 / engine->get_user_physics_ticks_per_second();
const double step_scaled = step * engine->get_effective_time_scale();
return step_scaled;
}