@joie, the thing that Maya is doing is separating the data into chunks that are easier for the user to digest. Typically, you will see this data stored in the local and world space pivots when you freeze a transform. For example, you move an object 10 units in positive X and then freeze the transform. The channel box will show a value of 0 on X, but the 10 units in X is pushed to the world pivot. This extra transformation is applied by Maya, but allows the user to do things like animate the node with cleaner values that always needing the base world pivot baked into the data.
This is also where we get into issues with our exporter and the glTF format. Our exporter has no way to represent the pivot data in a glTF, so what you end up with is baking the pivot data into the pivot itself. To illustrate this, here is a simple scene that you can load into the sandbox to follow along:
freezeTest.zip (1.6 KB)
The grey cube sits at the world origin for reference. The red cube is 3 units in X from the world origin and has it’s transform frozen in Maya. The green cube sits -3 units in X from the world origin, but is not frozen. You will notice when selecting the green cube, that the units are represented as authored:
When selecting the red cube, you will also see that the frozen transform from Maya is respected:
What this translates to in reality, is that the local pivot in Maya which has a world space pivot offset saved to it is baked to the pivot in glTF. So when you select the red cube and enable the transform tool, we see where the pivot for the red cube sits:
While the green cube retains the pivot as you would see it in Maya:
This is similar to a parented node where the transform of the node is based off of the parent location. The blue cube sits at 2 units in Y, and is the parent of the teal cube. The teal cube is 3 units in X from its parent so you will see the transform of the teal cube as:
It does not have any translation in Y, even though it sits 2 units in Y above the origin because that transform is on the parent node.
So what this means for determining a coordinate to look at is that when authoring in Maya that transforms should not be frozen as this will change the pivot of the mesh to put the world pivot offset back into the object pivot, and you will lose some data. If you need to zero out data similar to freezing a transform, but need to know what the offset is, use a parent node like a locator. This is a transform with no mesh. Using a locator to set the zeroed location of your mesh will do the same thing as freezing the transform without losing the data converting to glTF. Otherwise, you can just not freeze transforms and always take the world offset into account when animating, etc.
If you go with the parenting route, you can always walk the hierarchy of a node to get the full offset so you know exactly where it is in world space. You will just add up all of the offsets from the targeted node and all parent nodes and you will have the exact position in world space.
Hope this makes sense and unblocks you a bit. I know that reworking the scene may be inconvenient. If it’s a major rework, you could drop a locator in the scene in the position of your mesh and use that as your target position. You can easily do this by creating a locator and then adding a point constraint from the locator to your target mesh. The point constraint will move the locator to the position of the target’s pivot automatically. Then simply delete the point constraint and you have a transform that is exactly in the same position as the mesh without the frozen transform. You can then target the locator in your code rather than the mesh, which will shortcut some rework if needed.