Maklaud
09-01-2007 19:48:40
Hi!! I need my camera collide with all objects in my scene. Bun I can't do it
I saw this topic:
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=2110
And I use Dragon's code. But it dosen't work correctly... My camera stay in one point and I can't move it. I can't understand, where the problem is.
I create files FPPCamers.h and *.cpp like in this topic. But I use ExampleApplication and ExampleFrameListener. This code I put into createScene in my application-class:
Other code below this part (keyReleased, keyPressed and so on) I put in my FrameListener-class.
Can anybody help my with my problem?
http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=2110
And I use Dragon's code. But it dosen't work correctly... My camera stay in one point and I can't move it. I can't understand, where the problem is.
I create files FPPCamers.h and *.cpp like in this topic. But I use ExampleApplication and ExampleFrameListener. This code I put into createScene in my application-class:
//add my camera and apply material pair with floor
FPPcamera = new FPPCamera(mSceneMgr,m_World,mCamera);
OgreNewt::MaterialPair* material_pair2 = new OgreNewt::MaterialPair( m_World, FPPcamera->FPPmat, floormat );
material_pair2->setDefaultFriction(0.0f, 0.0f);
material_pair2->setDefaultSoftness(1);
material_pair2->setDefaultElasticity(0);
material_pair2->setContinuousCollisionMode(0);
Other code below this part (keyReleased, keyPressed and so on) I put in my FrameListener-class.
Can anybody help my with my problem?