You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When nesting an AnimatableBody2D under a PathFollow2D, and changing the offset of the PathFollow node, the AnimatableBody node moves along the path, but the collision for that node stays at the origin.
For instance, take this scene:
And let's run it with paths and collision shapes visible:
As you can see, the animatable body and its child collision shape move along, but the collision detection still uses the origin point as where the platform really is.
Workaround
After updating the PathFollow2D offset, set the position of the AnimatableBody2D to itself:
Now the engine recognizes the new location of the collision shape, and updates accordingly:
Steps to reproduce
First, create a tree similar that contains a Path2D, PathFollow2D and a fully configured AnimatableBody2D:
Move the PathFollow2D node along the path using offset:
The collision of the AnimatableBody2D node did not update according to its new location.
Step to workaround
Right after you update the offset, assign the body's own global_position to iself. Now the collision is updated:
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered:
Godot version
4.0.alpha11
System information
M1 MBP, MacOS Monterey
Issue description
When nesting an AnimatableBody2D under a PathFollow2D, and changing the offset of the PathFollow node, the AnimatableBody node moves along the path, but the collision for that node stays at the origin.
For instance, take this scene:
And let's run it with paths and collision shapes visible:
As you can see, the animatable body and its child collision shape move along, but the collision detection still uses the origin point as where the platform really is.
Workaround
After updating the PathFollow2D offset, set the position of the AnimatableBody2D to itself:
Now the engine recognizes the new location of the collision shape, and updates accordingly:
Steps to reproduce
First, create a tree similar that contains a Path2D, PathFollow2D and a fully configured AnimatableBody2D:
Move the PathFollow2D node along the path using offset:
The collision of the AnimatableBody2D node did not update according to its new location.
Step to workaround
Right after you update the offset, assign the body's own global_position to iself. Now the collision is updated:
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: