summaryrefslogtreecommitdiff
path: root/scene/3d/path_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/path_3d.cpp')
-rw-r--r--scene/3d/path_3d.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp
index f53e783fbd..25226ad384 100644
--- a/scene/3d/path_3d.cpp
+++ b/scene/3d/path_3d.cpp
@@ -296,7 +296,7 @@ void PathFollow3D::_update_transform(bool p_update_xyz_rot) {
}
}
- t.translate(Vector3(h_offset, v_offset, 0));
+ t.translate_local(Vector3(h_offset, v_offset, 0));
} else {
t.origin = pos + Vector3(h_offset, v_offset, 0);
}
@@ -397,6 +397,7 @@ void PathFollow3D::_bind_methods() {
}
void PathFollow3D::set_offset(real_t p_offset) {
+ ERR_FAIL_COND(!isfinite(p_offset));
prev_offset = offset;
offset = p_offset;