collision detection

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
zetwal
Posts: 4
Joined: Mon Jun 14, 2004 9:58 pm

collision detection

Post 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
Valkyr
Posts: 11
Joined: Tue Jun 29, 2004 11:11 pm

Post by Valkyr »

Maybe post some code?
zetwal
Posts: 4
Joined: Mon Jun 14, 2004 9:58 pm

Post 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?
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

yeah, double check your adding a collision responce animator to all of the bots themselves, not just the level
The Robomaniac
Project Head / Lead Programmer
Centaur Force
zetwal
Posts: 4
Joined: Mon Jun 14, 2004 9:58 pm

Post 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();
elhim
Posts: 16
Joined: Sat Mar 13, 2004 12:37 am
Location: LI, NY

Post by elhim »

Post Reply