I'm writing an simple exporter (a SceneExport) to describe a level in XML for a game I'm writing. One of the requirements is to specify a path using splines.
I'm able to get to this data quite easily by
- creating a ShapeObject from a found Shape (spline)
- creating a PolyShape
- iterating through all it's lines
- for each line go through all the points and record them
My problem is that the point data appears to be in local space. I test this by putting the first point at (0,0,0) and checking the output. The example IGameExporter (which I'm not using) also seems to have this problem.
After much sdk documentation reading, I'm thinking this is a local space to world space conversion issue.
I tried the obvious (well to me)
Matrix3 tMatrix = inode->GetObjectTM(mInterfacePointer->GetTime());
Point3 p = line->pts[j].p;
Which had no effect.
Any pointers in the right direction is much appreciated.
I've just started Max plugin dev, so I hope this makes sense. I also couldn't find any previous posts addressing this.
Thanks in advance!
3d studio max version: 9