summaryrefslogtreecommitdiff
path: root/scene/3d/velocity_tracker_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/velocity_tracker_3d.cpp')
-rw-r--r--scene/3d/velocity_tracker_3d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/velocity_tracker_3d.cpp b/scene/3d/velocity_tracker_3d.cpp
index a027749eaa..8f4fecb348 100644
--- a/scene/3d/velocity_tracker_3d.cpp
+++ b/scene/3d/velocity_tracker_3d.cpp
@@ -70,7 +70,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_iterations_per_second();
+ base_time = double(base - position_history[0].frame) / Engine::get_singleton()->get_physics_ticks_per_second();
} else {
uint64_t base = Engine::get_singleton()->get_frame_ticks();
base_time = double(base - position_history[0].frame) / 1000000.0;
@@ -83,7 +83,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_iterations_per_second();
+ delta = double(diff) / Engine::get_singleton()->get_physics_ticks_per_second();
} else {
delta = double(diff) / 1000000.0;
}