Another question - inital rotation position

scratchyrice

05-12-2007 18:40:16

How do i, on loading, initialy set the rotation of the body.

albino

16-12-2007 19:31:08

i used this code to rotate the mesh and then added collision and body into it

Ogre::Quaternion orientbox(Ogre::Vector3(1,0,0),Ogre::Vector3(0,1,0), Ogre::Vector3(0,0,1));
orientbox.FromAngleAxis(Ogre::Radian(Ogre::Degree(-90)), Ogre::Vector3(1,0,0));
orientbox.normalise();
floornode->setOrientation(orientbox);

... ... ...

bod->setPositionOrientation( Ogre::Vector3(0.0,-20.0,0.0), floornode->getOrientation() );