Change position of the child mesh

I use mesh.setParent Mesh | Babylon.js Documentation (babylonjs.com) 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 (babylonjs.com)](https://playground.babylonjs.com/#7V0Y1I#1627)

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 https://playground.babylonjs.com/#7V0Y1I#1629

1 Like