Acid_Gambit
26-03-2007 18:55:20
I have a strange problem...for some reason my ogre object and collision body are not aligned.
As you can see in the picture (blue box = ogre object, red lines = ogrenewt body) the collision body is completely offset.
I can't find anything in my code either:
What makes it even more odd is when I paste the code above in Demo01_TheBasics (or any other demo related code) the bodies are aligned.
As you can see in the picture (blue box = ogre object, red lines = ogrenewt body) the collision body is completely offset.
I can't find anything in my code either:
mMainNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(mName);
mEntity = mSceneMgr->createEntity(mName, "box.mesh");
mEntity->setMaterialName("Materials/FrostedGlass");
Ogre::Vector3 size(20.0, 20.0, 20.0);
mMainNode->setScale(size);
mMainNode->attachObject(mEntity);
OgreNewt::Collision* col = new OgreNewt::CollisionPrimitives::Box( mWorld, size );
player = new OgreNewt::Body( mWorld, col );
player->attachToNode( mMainNode );
player->setPositionOrientation(Ogre::Vector3(0, 0, 0), Ogre::Quaternion::IDENTITY);
delete col;
What makes it even more odd is when I paste the code above in Demo01_TheBasics (or any other demo related code) the bodies are aligned.