Page 1 of 1

collision detection

Posted: Sun Jun 27, 2004 9:14 pm
by zetwal
Hello

I am programing some bots that move around in a building (a .3ds model). I've used the coillison detection method detailed in the collision tutorial but my bots still cross the walls of my building. (i checked with a FPS camera and it works)
I would like to know why this is so and also could someone please suggest me something else that might work for my bots.

Cheers

Posted: Wed Jun 30, 2004 12:06 am
by Valkyr
Maybe post some code?

Posted: Mon Jul 05, 2004 9:35 pm
by zetwal
I am in fact implementing flocking (bots moving around a leader)and all i would like to know is: Does irrlicht manage collision detetion between bots and a scene given that the bots r not controlled by the keyboard?

Posted: Mon Jul 05, 2004 9:53 pm
by Robomaniac
yeah, double check your adding a collision responce animator to all of the bots themselves, not just the level

Posted: Mon Jul 05, 2004 10:03 pm
by zetwal
This is my code for the bots andf it does nothing

for (int i=0; i<5; i++){
scene::ISceneNodeAnimator* anim =
smgr->createCollisionResponseAnimator
(
selector, myModel[i].anmsModel,
core::vector3df(10,10,10),
core::vector3df(0, 0,0),
100.0f,
core::vector3df(0,0,0)
);

myModel[i].anmsModel->addAnimator(anim);
myModel[i].anmsModel->setDebugDataVisible(true);
anim->drop();
}


while this for the FPS camera works

camera = smgr->addCameraSceneNodeFPS(0, 100.0f, 100.0f);

scene::ISceneNodeAnimator* anim =
smgr->createCollisionResponseAnimator(
selector, camera, core::vector3df(10,10,10),
core::vector3df(0,0,0), 100.0f,
core::vector3df(0,0,0)
);
camera->addAnimator(anim);
anim->drop();

Posted: Tue Jul 06, 2004 11:04 pm
by elhim