diff options
| author | Manuel Moos | 2018-02-11 00:03:31 +0100 |
|---|---|---|
| committer | Manuel Moos | 2018-04-09 22:27:29 +0200 |
| commit | d5abd4eb750387c95d1040e7613f98bd816c58bb (patch) | |
| tree | b69b6829a61b4573b9bfaacac8ab91af547aa79a /core/engine.cpp | |
| parent | ca1312dbe95b885786b541220857039f4411bcaa (diff) | |
| download | godot-d5abd4eb750387c95d1040e7613f98bd816c58bb.tar.gz godot-d5abd4eb750387c95d1040e7613f98bd816c58bb.tar.zst godot-d5abd4eb750387c95d1040e7613f98bd816c58bb.zip | |
Diffstat (limited to 'core/engine.cpp')
| -rw-r--r-- | core/engine.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/engine.cpp b/core/engine.cpp index af9052110..b2c34a853 100644 --- a/core/engine.cpp +++ b/core/engine.cpp @@ -42,6 +42,16 @@ int Engine::get_iterations_per_second() const { return ips; } +void Engine::set_physics_jitter_fix(float p_threshold) { + if (p_threshold < 0) + p_threshold = 0; + physics_jitter_fix = p_threshold; +} + +float Engine::get_physics_jitter_fix() const { + return physics_jitter_fix; +} + void Engine::set_target_fps(int p_fps) { _target_fps = p_fps > 0 ? p_fps : 0; } @@ -137,6 +147,7 @@ Engine::Engine() { singleton = this; frames_drawn = 0; ips = 60; + physics_jitter_fix = 0.5; _frame_delay = 0; _fps = 1; _target_fps = 0; |
