Code: Select all
scene::IMeshSceneNode* node = smgr->addMeshSceneNode(mesh);
node->setMaterialFlag(video::EMF_LIGHTING,false);
scene::ITriangleSelector* tri = smgr->createTriangleSelector(mesh,node);
node->setTriangleSelector(tri);
scene::ICameraSceneNode* cam = smgr->addCameraSceneNodeFPS(0,100.0f,0.5f,0,0,0,false,3.0f,false,true);
cam->setPosition(core::vector3df(0.0f,10.0f,0.0f));
scene::ISceneNodeAnimator* coll = smgr->createCollisionResponseAnimator( tri, cam, core::vector3df(30,50,30), core::vector3df(0,-10,0), core::vector3df(0,30,0));
cam->addAnimator(coll);