hoffhoff
04-10-2006 23:28:48
Hello,
Here is my problem: I´m loading a .mesh file, but it is not correct. I need to rotate it.
So Im trying:
but it does not work. The mesh do rotate, but the newton body still holds the old orientation.
I also tried:
But I still have the same problem.
Could someone tell me what I´m doing wrong?
Thanks!
Here is my problem: I´m loading a .mesh file, but it is not correct. I need to rotate it.
So Im trying:
ent = pSceneManager->createEntity(entityname, meshfilename);
pSceneNode = pSceneManager->getRootSceneNode()->createChildSceneNode(nodename);
pSceneNode->setScale(scale);
pSceneNode->pitch(Ogre::Radian(PI/2), Ogre::Node::TransformSpace::TS_LOCAL);
conv = new OgreNewt::CollisionPrimitives::ConvexHull(pWorld, pSceneNode, pSceneNode->getOrientation(); pSceneNode->getPosition());
pBody = new OgreNewt::Body(pWorld, conv);
...
but it does not work. The mesh do rotate, but the newton body still holds the old orientation.
I also tried:
ent = pSceneManager->createEntity(entityname, meshfilename);
pSceneNode = pSceneManager->getRootSceneNode()->createChildSceneNode(nodename);
pSceneNode->setScale(scale);
Ogre::Quaternation orientbox(Vector3(0,-1,0), Vector3(1,0,0), Vector3(0,0,1));
orientbox.FromAngleAxis(Radian(Degree(-90)), Vector3(1,0,0);
pSceneNode->setOrientation(orientbox);
conv = new OgreNewt::CollisionPrimitives::ConvexHull(pWorld, pSceneNode, pSceneNode->getOrientation(); pSceneNode->getPosition());
pBody = new OgreNewt::Body(pWorld, conv);
...
But I still have the same problem.
Could someone tell me what I´m doing wrong?
Thanks!