Merge pull request #30226 from lawnjelly/interpolate
Add access to interpolation fraction for fixed timestep interpolation
This commit is contained in:
commit
20a3bb9c48
8 changed files with 22 additions and 0 deletions
|
|
@ -2941,6 +2941,10 @@ float _Engine::get_physics_jitter_fix() const {
|
|||
return Engine::get_singleton()->get_physics_jitter_fix();
|
||||
}
|
||||
|
||||
float _Engine::get_physics_interpolation_fraction() const {
|
||||
return Engine::get_singleton()->get_physics_interpolation_fraction();
|
||||
}
|
||||
|
||||
void _Engine::set_target_fps(int p_fps) {
|
||||
Engine::get_singleton()->set_target_fps(p_fps);
|
||||
}
|
||||
|
|
@ -3029,6 +3033,7 @@ void _Engine::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("get_iterations_per_second"), &_Engine::get_iterations_per_second);
|
||||
ClassDB::bind_method(D_METHOD("set_physics_jitter_fix", "physics_jitter_fix"), &_Engine::set_physics_jitter_fix);
|
||||
ClassDB::bind_method(D_METHOD("get_physics_jitter_fix"), &_Engine::get_physics_jitter_fix);
|
||||
ClassDB::bind_method(D_METHOD("get_physics_interpolation_fraction"), &_Engine::get_physics_interpolation_fraction);
|
||||
ClassDB::bind_method(D_METHOD("set_target_fps", "target_fps"), &_Engine::set_target_fps);
|
||||
ClassDB::bind_method(D_METHOD("get_target_fps"), &_Engine::get_target_fps);
|
||||
|
||||
|
|
|
|||
|
|
@ -746,6 +746,7 @@ public:
|
|||
|
||||
void set_physics_jitter_fix(float p_threshold);
|
||||
float get_physics_jitter_fix() const;
|
||||
float get_physics_interpolation_fraction() const;
|
||||
|
||||
void set_target_fps(int p_fps);
|
||||
int get_target_fps() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue