I've got some code working for my collision detection, however, I am having trouble with the area of the collision.
For example, I have a building in my game scene, and although the collision works, the camera goes through the walls a bit first before stopping. I'm assuming this has to do with setting the area for the collision, so wondered if anyone could point me in the right direction of what I must change in my code.
Code: Select all
ITriangleSelector* templeCollision = 0;
templeCollision = smgr->createOctreeTriangleSelector(temple->getMesh(), temple, 20);
temple->setTriangleSelector(templeCollision);
ISceneNodeAnimator* coll3 = smgr->createCollisionResponseAnimator(templeCollision, camera1,
vector3df(200,50,60),
vector3df(0,0,0),
vector3df(0,0,0));
templeCollision->drop();
camera1->addAnimator(coll3);
coll3->drop();