How to covert local position to world position

I used setParent to have a local position, how to covert local position to world position?

const worldPos = BABYLON.Vector3.TransformCoordinates(localPos, mesh.getWorldMatrix());

2 Likes

Passing a null value,

your_node.setParent(null)

works for me.

2 Likes

Also if you call getAbsolutePosition() you can get the mesh’s world position from its computed world matrix, if that’s what you’re after.

const worldPos = mesh.getAbsolutePosition();
4 Likes

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

1 Like