mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Fixed Timestep Interpolation (3D)
Adds fixed timestep interpolation to the visual server. Switchable on and off with project setting. This version does not add new API for set_transform etc, when nodes have the interpolated flag set they will always use interpolation.
This commit is contained in:
@@ -291,6 +291,17 @@ int64_t MainTimerSync::DeltaSmoother::smooth_delta(int64_t p_delta) {
|
||||
// before advance_core considers changing the physics_steps return from
|
||||
// the typical values as defined by typical_physics_steps
|
||||
float MainTimerSync::get_physics_jitter_fix() {
|
||||
// Turn off jitter fix when using fixed timestep interpolation
|
||||
// Note this shouldn't be on UNTIL 2d interpolation is implemented,
|
||||
// otherwise we will get people making 2d games with the physics_interpolation
|
||||
// set to on getting jitter fix disabled unexpectedly.
|
||||
#if 0
|
||||
if (Engine::get_singleton()->is_physics_interpolation_enabled()) {
|
||||
// would be better to write a simple bypass for jitter fix but this will do to get started
|
||||
return 0.0;
|
||||
}
|
||||
#endif
|
||||
|
||||
return Engine::get_singleton()->get_physics_jitter_fix();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user