I'm having gimbol lock issues in my space game. Is there a rotation command that does not use euler angles?
The matrices stored in the position data (on the sObject struct) look promising, but my half-blind attempts aren't getting me anywhere. It seems this should work:
//...//
D3DXVECTOR3 p = parent->getDerivedPosition();
D3DXQUATERNION q = parent->getDerivedOrientation();
sObject * obj = dbGetObject(id_);
obj->position.bCustomWorldMatrix = true;
D3DXMatrixRotationQuaternion(&obj->position.matWorld, &q);
obj->position.matWorld._13 = p.x;
obj->position.matWorld._23 = p.y;
obj->position.matWorld._33 = p.z;
But the result is a stretched and smushed spaceship. Setting matRotation and matTranslation didn't do anything.