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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/3d/velocity_tracker_3d.cpp b/scene/3d/velocity_tracker_3d.cpp
index 216330939a..db10f3273b 100644
--- a/scene/3d/velocity_tracker_3d.cpp
+++ b/scene/3d/velocity_tracker_3d.cpp
@@ -88,8 +88,9 @@ Vector3 VelocityTracker3D::get_tracked_linear_velocity() const {
delta = double(diff) / 1000000.0;
}
- if (base_time + time_accum + delta > max_time)
+ if (base_time + time_accum + delta > max_time) {
break;
+ }
distance_accum += distance;
time_accum += delta;