PDA

View Full Version : CoordSys confusion.


scorpion007
06-23-2007, 09:40 AM
Hi,
I seem to be misunderstanding how 'in coordsys' works.

I have a box, and I get the position of its first vertex the following way:

getVert $.mesh 1

It returns [-21.3491,-18.9629,0]

Ok, so I want to now get both its position relative to its node, and relative to the world, in the following way:

in coordsys local getVert $.mesh 1
[-21.3491,-18.9629,0]
in coordsys world getVert $.mesh 1
[-21.3491,-18.9629,0]

I get the same values. I move the box, try to get the vert's world position, still same result.
What the heck is up? How can it still be the same?

scorpion007
06-23-2007, 09:53 AM
Nevermind, I just realised that the positions I'm getting are *already* relative to the node's transform. If I want them in world space I can just multiply them by the node's transform matrix.

CGTalk Moderation
06-23-2007, 09:53 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.