diff options
author | Ricardo Buring <ricardo.buring@gmail.com> | 2024-02-17 00:57:32 +0100 |
---|---|---|
committer | Ricardo Buring <ricardo.buring@gmail.com> | 2024-03-23 12:28:36 +0100 |
commit | 2ed2ccc2d8ff17b97d8ac0fd80fc0190ea47ed00 (patch) | |
tree | 0b0595cc3bf93413b4a394967ea96fde2f7cd3d3 /scene/2d/camera_2d.h | |
parent | fe01776f05b1787b28b4a270d53037a3c25f4ca2 (diff) | |
download | redot-engine-2ed2ccc2d8ff17b97d8ac0fd80fc0190ea47ed00.tar.gz |
Fixed Timestep Interpolation (2D)
Adds fixed timestep interpolation to the rendering server (2D only).
Switchable on and off with a project setting (default is off).
Co-authored-by: lawnjelly <lawnjelly@gmail.com>
Diffstat (limited to 'scene/2d/camera_2d.h')
-rw-r--r-- | scene/2d/camera_2d.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/2d/camera_2d.h b/scene/2d/camera_2d.h index 5693d05ee5..bf25267aa8 100644 --- a/scene/2d/camera_2d.h +++ b/scene/2d/camera_2d.h @@ -102,6 +102,14 @@ protected: Camera2DProcessCallback process_callback = CAMERA2D_PROCESS_IDLE; + struct InterpolationData { + Transform2D xform_curr; + Transform2D xform_prev; + uint32_t last_update_physics_tick = 0; + } _interpolation_data; + + void _ensure_update_interpolation_data(); + Size2 _get_camera_screen_size() const; protected: |