pigga
March 28, 2022, 8:31pm
1
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.
pigga
March 28, 2022, 8:41pm
3
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
pigga
March 28, 2022, 9:20pm
5
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