Child nodes with physics bodies do not move when the parent is moved

Hello

I’m trying to animate a set of STATIC/ANIMATED rigid bodies which I’ve made the child nodes of a normal node.

When I alter the position of the parent node either directly using setPosition or through tweens.

  1. The child nodes do not move in case of STATIC body type.

  2. And in the case of ANIMATED body the sprite moves around, but the physics body stays in the same location.

Screenshot 2022-08-09 at 2.42.12 PM

I have attached the project as well. Please let me know the proper approach. Is there a way to sync the physics bodies.

static-move.zip (1.9 MB)

1 Like

this is a bug, and i have created an issue for tracking, thanks for the feedback.

1 Like

if you want to move STATIC, try to set it position directly.

1 Like

https://github.com/cocos/cocos-engine/pull/13747