What can cause mesh.setParent position to be off

I’m using mesh.setParent to make one mesh move with another, it works well for all the cases, except for one case, the mesh position is totally off when I setParent, any idea what can cause this?

Hmm can you make a playground to show what isn’t working and explain how you expect/want it to behave? Then we can help get it sorted out but otherwise it could be really hard to help with I think… :slight_smile:

Mesh.setParent will remain the mesh position.

Two cases:
Set parent position before the childMesh invoke setParent:

Set parent position after the childMesh invoke setParent:

The topic about the different between setParent method and parent accessor:
https://forum.babylonjs.com/t/why-node-setparent-will-remain-the-position-default/28746/5

I don’t know if your question is asking about this.Hope that it can help you.

1 Like

Hello just checking in, was your question answered? @pigga