diff options
Diffstat (limited to 'scene/3d/path_3d.cpp')
-rw-r--r-- | scene/3d/path_3d.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp index 5fd28a6ff3..4981125057 100644 --- a/scene/3d/path_3d.cpp +++ b/scene/3d/path_3d.cpp @@ -253,11 +253,11 @@ TypedArray<String> PathFollow3D::get_configuration_warnings() const { if (is_visible_in_tree() && is_inside_tree()) { if (!Object::cast_to<Path3D>(get_parent())) { - warnings.push_back(TTR("PathFollow3D only works when set as a child of a Path3D node.")); + warnings.push_back(RTR("PathFollow3D only works when set as a child of a Path3D node.")); } else { Path3D *path = Object::cast_to<Path3D>(get_parent()); if (path->get_curve().is_valid() && !path->get_curve()->is_up_vector_enabled() && rotation_mode == ROTATION_ORIENTED) { - warnings.push_back(TTR("PathFollow3D's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its parent Path3D's Curve resource.")); + warnings.push_back(RTR("PathFollow3D's ROTATION_ORIENTED requires \"Up Vector\" to be enabled in its parent Path3D's Curve resource.")); } } } @@ -310,7 +310,7 @@ void PathFollow3D::set_offset(real_t p_offset) { if (path->get_curve().is_valid()) { real_t path_length = path->get_curve()->get_baked_length(); - if (loop) { + if (loop && path_length) { offset = Math::fposmod(offset, path_length); if (!Math::is_zero_approx(p_offset) && Math::is_zero_approx(offset)) { offset = path_length; |