Skip to content

Commit

Permalink
Merge pull request #51358 from raulsntos/fix-51342-3.x
Browse files Browse the repository at this point in the history
[3.x] Fix Path3D initial forward calculation
  • Loading branch information
akien-mga authored Aug 7, 2021
2 parents b44f212 + 102ec10 commit 41cf7f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/3d/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void PathFollow::_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) {
Expand Down

0 comments on commit 41cf7f2

Please sign in to comment.