|
I use this code to get the offset Matrix:
Matrix3 MaxOffTM(1)
Point3 OffPos = ipgamenode->GetMaxNode()->GetObjOffsetPos()
Quat Rot = ipgamenode->GetMaxNode()->GetObjOffsetRot()
ScaleValue scl = ipgamenode->GetMaxNode()->GetObjOffsetScale()
MaxOffTM.SetTrans(OffPos)
PreRotateMatrix(MaxOffTM,Rot)
ApplyScaling(MaxOffTM,scl)
And then, get mesh with IGameMesh:
IGameObject * obj = ipgamenode->GetIGameObject()
IGameMesh * gM = (IGameMesh*)obj;
if (gM->InitializeData())
{
int numV = gM->GetNumberOfVerts()
for(i = 0;i<numV;i++)
{
gM->GetVertex(i,v)
//gM->GetVertex(i,v,true)//I have tried this yet;
}
}
when I export an model which have a node’s ‘PIVOT’ has Transformed in max[Affect pivot only],,I get a wrong model.
example:Rotate the node named node01’s ‘PIVOT’ x:90 y:0 z:0,then in result,I get node01 with wrong Transformation.But other node in the model is right.
what should i do?Thanks for your attention.
|