Change position of the child mesh

I use mesh.setParent Mesh | Babylon.js Documentation ( to make the child mesh move position and rotation with the parent mesh.

Playground example:
Before the mesh generated, the animation has stopped, is there any way to make the mesh be attached to the box (be on the same position)

Examples | Babylon.js Playground (](

use .parent = instead of setParent() this way the current position won t be impacted.

I just tried, it is still the same problem, I need one mesh always be attached with another mesh

Can you repro in the playground ? I am not sure to understand your issue

I updated a very simple playground example, hope it helps to better understand

Not sure what you expect to happen, this seems to be what you want

1 Like