summaryrefslogtreecommitdiff
path: root/core/engine.h
diff options
context:
space:
mode:
authorlawnjelly <lawnjelly@gmail.com>2019-07-01 17:42:02 +0100
committerlawnjelly <lawnjelly@gmail.com>2019-07-11 08:25:26 +0100
commitbf6c301b9cb515789db03743dbcebc67a1865538 (patch)
tree140da2ddbf1ba40d57295ac284b691a3c5e346b0 /core/engine.h
parentd40dbd6d1119a6e9f04431105f44185d9103b4e0 (diff)
Add access to interpolation fraction for fixed timestep interpolation
Addresses #30068 This is a prerequisite for allowing proper support for fixed timestep interpolation, exposing the interpolation fraction to the engine, modules and gdscript. The interpolation fraction is the fraction through the current physics tick at the time of the current frame.
Diffstat (limited to 'core/engine.h')
-rw-r--r--core/engine.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/engine.h b/core/engine.h
index 15665fee29..192e8e67a0 100644
--- a/core/engine.h
+++ b/core/engine.h
@@ -63,6 +63,7 @@ private:
float _time_scale;
bool _pixel_snap;
uint64_t _physics_frames;
+ float _physics_interpolation_fraction;
uint64_t _idle_frames;
bool _in_physics;
@@ -95,6 +96,7 @@ public:
bool is_in_physics_frame() const { return _in_physics; }
uint64_t get_idle_frame_ticks() const { return _frame_ticks; }
float get_idle_frame_step() const { return _frame_step; }
+ float get_physics_interpolation_fraction() const { return _physics_interpolation_fraction; }
void set_time_scale(float p_scale);
float get_time_scale() const;