FPS camera, mesh is basically the inside of a room.
If i walk around etc i'm stopped from walking through the walls, but lets say you turn around whilst moving against the wall etc you sometimes get stuck, and then i can fall through the mesh and i fall to my doom.
this is my code, if anyone has any suggestions i'd be more than grateful:
Code: Select all
IAnimatedMesh* innmesh = gameData.m_Smgr->getMesh("inn/inn_mesh.3ds");
scene::ISceneNode* inn = 0;
inn = gameData.m_Smgr->addAnimatedMeshSceneNode(innmesh);
scene::ITriangleSelector* selector = 0;
selector = gameData.m_Smgr->createOctTreeTriangleSelector(innmesh->getMesh(0), inn, 128);
gameData.m_Camera = gameData.m_Smgr->addCameraSceneNodeFPS(0, 75,100,-1,keyMap,4);
// Mesh collision for inn
scene::ISceneNodeAnimator* mesh_anim =
gameData.m_Smgr->createCollisionResponseAnimator(
selector, gameData.m_Camera, core::vector3df(10,50,10),
core::vector3df(0,-3,0),
core::vector3df(0,50,0));
gameData.m_Camera->addAnimator(mesh_anim);
mesh_anim->drop();