summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-08-07 13:30:19 +0200
committerGitHub <noreply@github.com>2021-08-07 13:30:19 +0200
commitd6329c5f0899c9f42d254f8b8fcf6ca1ac30846a (patch)
treec7702ab8000b314a5f167c383d4bc758fb1bdecd
parenta7f96e07d01f0b4f7ffb1eda829381d959b86e4e (diff)
parent18f7acf611a4a2adccac36fa8a611b5b630ddd36 (diff)
Merge pull request #51357 from raulsntos/fix-51342
Fix Path3D initial forward calculation
-rw-r--r--scene/3d/path_3d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp
index 490cf5fe67..589135710f 100644
--- a/scene/3d/path_3d.cpp
+++ b/scene/3d/path_3d.cpp
@@ -120,7 +120,7 @@ void PathFollow3D::_update_transform(bool p_update_xyz_rot) {
// will be replaced by "Vector3(h_offset, v_offset, 0)" where it was formerly used
if (rotation_mode == ROTATION_ORIENTED) {
- Vector3 forward = c->interpolate_baked(o_next, cubic);
+ Vector3 forward = c->interpolate_baked(o_next, cubic) - pos;
// Try with the previous position
if (forward.length_squared() < CMP_EPSILON2) {