Node rotation Q

I was under the impression that when you rotated a node, all its children got their local/world-translations updated to reflect the rotation, but it seems that’s not happening.



Because of that I have to keep track of certain important spatials (planets) position so autopiloting, for example, would move the ship to the proper place.



What would be the best way to get that “rotated” local translation?



Something along the line of: planetSpatial.getRotation().multLocal(node.getRotation); as this is what’s being done in Spatials? Could/should that be done with a control instead? Or is there something wrong as the node should update its children?

Use Transforms and worldToLocal

madjack said:
I was under the impression that when you rotated a node, all its children got their local/world-translations updated to reflect the rotation, but it seems that's not happening.


Local translation/rotation would always be relative to parent but the world translation should change as the parent changes.
1 Like

Duh, yeh, probably you’re only looking for getWorldTranslation and getWorldRotation ^^

Excellent. Working as intended. Thanks Paul. :slight_smile: