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
collision detection
-
- Posts: 602
- Joined: Sat Aug 23, 2003 2:03 am
- Location: Pottstown, PA
- Contact:
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();
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();