Vertex Positions

Vertex Positions

Does anyone know the method to get the actual positions of an object's vertices, even when it has been Scaled or Rotated? The positions seem to be reported pre-scaling and pre-rotation. I'd like to be able to put an object on the floor (X/Z plane) regardless of transformations.

You need the obj2WorldMatrix() from the object (Object class). You can then multiply the vertices with the with the object to world matrix to transform the vertices from the polygon objects local coordinate space to the world/global coordinate space.

The "Macro/Simple ASCII Export.js" script contains some sample code.

Outstanding. Thank you Martin.

I just ordered a used copy of "3D Math Primer for Graphics and Games Development." So I will read up on transform matrices and will also look at the "Macro/Simple ASCII Export" Script.