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

Implement adjusting the maximum number of physics steps per rendered frame

When using high physics FPS (which is a requirement to minimize input
lag and improve precision in simulation racing games), a higher value
prevents the game from slowing down at low rendering FPS.

This can be done via an Engine property for run-time changes,
or a project setting for initial changes.
This commit is contained in:
Hugo Locurcio
2022-09-15 18:57:34 +02:00
parent ca25c6e0a3
commit 66f7c48e39
7 changed files with 43 additions and 3 deletions

View File

@@ -484,6 +484,9 @@ public:
void set_physics_ticks_per_second(int p_ips);
int get_physics_ticks_per_second() const;
void set_max_physics_steps_per_frame(int p_max_physics_steps);
int get_max_physics_steps_per_frame() const;
void set_physics_jitter_fix(double p_threshold);
double get_physics_jitter_fix() const;
double get_physics_interpolation_fraction() const;