Need some explanation on getLocalTranslation() update

Hello everybody,

i need some explanation on updating :

when i'm doing something like this :

myNode.getLocalTranslation().x = 180;

it is updated with a relative position to its parent so it's OK  :slight_smile:

but if i'm doing this :

myNode.getWorldTranslation().x = 180;

it is NOT updated in an absolute position.

Why ?

thanks for answers,


You shouldn't (can you even?) edit the world translation yourself – it's the scenetree's responsibility to calculate it (when you call Spatial.updateGeometricState or updateWorldVectors) by going through the spatials from the bottom node up. A childs world translation will be its local translation + its parents world translation.

ahhh i see,

so i will only use local,

thanks Per,


Happy to help :slight_smile: