Skip to content

Commit 66d19ab

Browse files
committed
Merge pull request #96629 from ditiem-games/path2d
Fix Animated Path2D doesn't update PathFollow2D progress when scene is running.
2 parents 22822f7 + 1b376b3 commit 66d19ab

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

scene/2d/path_2d.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,16 @@ void Path2D::_curve_changed() {
167167
return;
168168
}
169169

170-
if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_paths_hint()) {
171-
return;
172-
}
173-
174-
queue_redraw();
175170
for (int i = 0; i < get_child_count(); i++) {
176171
PathFollow2D *follow = Object::cast_to<PathFollow2D>(get_child(i));
177172
if (follow) {
178173
follow->path_changed();
179174
}
180175
}
176+
177+
if (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_paths_hint()) {
178+
queue_redraw();
179+
}
181180
}
182181

183182
void Path2D::set_curve(const Ref<Curve2D> &p_curve) {

0 commit comments

Comments
 (0)