Collision Detection: .obj mesh vs. Q3 Bsp
Collision Detection: .obj mesh vs. Q3 Bsp
Hi, im sorry if this is a widly asked question but does anyone know of a tutorial which will show me how to implement collision detection with a mesh(.obj) versus a quake 3 map? thanks;
-
- Posts: 170
- Joined: Sun Jul 01, 2007 11:41 pm
- Location: Manchester, UK
And this is how im doing it.
Selector = Globals::SceneMgr->createOctTreeTriangleSelector( Globals::Map->getMesh(0), Globals::MapNode, 128 );
Globals::MapNode->setTriangleSelector( Selector );
ISceneNodeAnimator *Collision = Globals::SceneMgr->createCollisionResponseAnimator( Selector,
RocketNode,
vector3df(25, 25, 25),
vector3df(0, 0, 0),
vector3df(0, 0, 0) );
RocketNode->addAnimator( Collision );
Collision->drop();
Selector->drop();
Selector = Globals::SceneMgr->createOctTreeTriangleSelector( Globals::Map->getMesh(0), Globals::MapNode, 128 );
Globals::MapNode->setTriangleSelector( Selector );
ISceneNodeAnimator *Collision = Globals::SceneMgr->createCollisionResponseAnimator( Selector,
RocketNode,
vector3df(25, 25, 25),
vector3df(0, 0, 0),
vector3df(0, 0, 0) );
RocketNode->addAnimator( Collision );
Collision->drop();
Selector->drop();