What on Earth? Position Vectors Reporting both local and world cords

I have been trying to use getTransformNodeByName(name).absolutePosition to get the world position from a transformNode that is the child of another transformNode.

But for some reason, both the worldspace (real absolute) and localspace cords appear depending on if the vector in the console is expanded or not… Odd…

If you look at the image below you can see what I am talking about. The vector seems to have a local coordinate value of the childNode if not expanded, but if you expand the object the values transform to world coordinates (what I need). WHAT???

If you try to use the .absolutePosition value, it is in localSpace not the world. What is going on here?

I tried meshes instead of transformNodes to verify it was not a transformNode thing, but get similar voodoo.

I hacked together an example. Sorry took a bit to strip all the unnecessary from the class.

NOTE, you have to load the pg once, open the console, then refresh with the console open to see double result.

See the console. VOODOO! (or possibly my poor understanding of things)

Did I break reality?

I was not computing worldMatrix


Question 2…

Why in my parent structure, do I need to divide all the distances between transform node locations by 2?

As far as I can tell I am NOT scaling everything up by 2x elsewhere. If you remove all the /2 nodes are spaced double what they should be.

The lines don’t see to be effected, only parented to root nodes

Yep :slight_smile:

For your question 2, do you mind simplifying a bit your code? When you have a child node, its position is relative to the parent and not absolute