So far, I figured out how to convert a local node position to global values in Swift (worldTransform).
My question is: How can I convert it the other way round? (due to rotation, x/y/z axis of the childnodes might be altered).
I know it has something to do with convertPosition, but I can't find any reference that helps me understanding it.
This is what I want to do: Node A is a child of rootNode and has a position A. Node B is a child of rootNode and has a position B and a rotation B. Node B1 is a childnode of Node B with local coordinates within it. I want to move Node B1 to Node A's position and replace it.
How do I translate Node A's coordinates to the local system of Node B?
Cheers