Absolute Position does not change right away when position is changed

Hey all,

I am running into an odd (I think it’s odd) bug where my absolutePosition is not updated after my position property was updated. It seems to take a frame?

Very basic example below, easy to see how absolutePosition still logs 0 after position was changed. When I use setAbsolutePosition it works but… that defeats the purpose in my case, since I would like to know the absolute position of a child mesh, after I have rotated a parent mesh.


Once again I found the answer right after posting… it seems that I need to use getAbsolutePosition instead.

And for rotation I can use this:

Hey I wanted to add some new discoveries here, since as it turns out the solution I saw before didn’t work either. What I had to do is reset the parent to the objects parent! Sounds insane? Check this out:


The code that did it:

    //This does NOT log the correct absoluteRotation


    //This DOES log the correct absoluteRotation


Just force compute world matrix, and you should be fine.


Omg yes. Much easier :wink: Thanks a bunch @nogalo!!.