summaryrefslogtreecommitdiffstats
path: root/core/core_bind.h
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-09-15 18:57:34 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-10-09 23:00:09 +0200
commit66f7c48e39c6479f11c0dd2426c093b0f2910f76 (patch)
treeaeec63f81055de9bcfb37d1a850937ce55662165 /core/core_bind.h
parentca25c6e0a3f25948ee4a197f3442c66f019e7424 (diff)
downloadredot-engine-66f7c48e39c6479f11c0dd2426c093b0f2910f76.tar.gz
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.
Diffstat (limited to 'core/core_bind.h')
-rw-r--r--core/core_bind.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/core_bind.h b/core/core_bind.h
index 9261698076..5c7702be0b 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -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;