Merge pull request #107273 from DexterFstone/add-game-speed-controls
Add game speed controls to the embedded game window
This commit is contained in:
@ -71,7 +71,7 @@ Vector3 VelocityTracker3D::get_tracked_linear_velocity() const {
|
||||
if (position_history_len) {
|
||||
if (physics_step) {
|
||||
uint64_t base = Engine::get_singleton()->get_physics_frames();
|
||||
base_time = double(base - position_history[0].frame) / Engine::get_singleton()->get_physics_ticks_per_second();
|
||||
base_time = double(base - position_history[0].frame) / Engine::get_singleton()->get_user_physics_ticks_per_second();
|
||||
} else {
|
||||
uint64_t base = Engine::get_singleton()->get_frame_ticks();
|
||||
base_time = double(base - position_history[0].frame) / 1000000.0;
|
||||
@ -84,7 +84,7 @@ Vector3 VelocityTracker3D::get_tracked_linear_velocity() const {
|
||||
Vector3 distance = position_history[i].position - position_history[i + 1].position;
|
||||
|
||||
if (physics_step) {
|
||||
delta = double(diff) / Engine::get_singleton()->get_physics_ticks_per_second();
|
||||
delta = double(diff) / Engine::get_singleton()->get_user_physics_ticks_per_second();
|
||||
} else {
|
||||
delta = double(diff) / 1000000.0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user