Maroho
11-06-2010 17:19:33
I'm making a Marble Madness type game and I want to use a third person viewpoint. Obviously I'm able to do with with Ogre by attaching the camera to the scene node using attachObject, however when I implemented OgreNewt the player object just falls through the geometry as if no collision has taken place. If I remove the camera from the scene node the collision works again, so that's where the problem is.
This section of code is where it all happens:
Any ideas? Is it a glitch, or have I done something wrong?
This section of code is where it all happens:
mPlayerEntity = OgreFramework::getSingletonPtr()->m_pSceneMgr->createEntity("Cylinder", "marble2.mesh");
mPlayerNode = OgreFramework::getSingletonPtr()->m_pSceneMgr->getRootSceneNode()->createChildSceneNode("Cylinder");
mPlayerNode->attachObject(mPlayerEntity);
mPlayerNode->setPosition(Ogre::Vector3(1520, 410, 1450))
mPlayerNode->attachObject(OgreFramework::getSingletonPtr()->m_pCamera);
spinner = PrimitiveFactory::getSingleton().createEllipsoid(mPlayerNode, 100);
spinner->setAutoSleep(0);
Any ideas? Is it a glitch, or have I done something wrong?