Temporarily disable collision detection

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
SuperElectric
Posts: 19
Joined: Fri May 13, 2005 7:20 am
Location: New York, NY

Temporarily disable collision detection

Post by SuperElectric »

Is there a handy way to temporarily disable collision detection on something (either the world or the robot/camera) after having added it? My situation is that I have a robot with a bunch of CollisionResponseAnimators attached, roving around in a quake map. If I want to move (teleport) the robot to a different location by calling setPosition, the collision detection places the robot somewhere else if there's a wall in the way.

Thanks,
-- Matt
DaBestGuest

Post by DaBestGuest »

You can put a variable when you are telporting and in your collison put

Code: Select all

if(teleporting == true)
{
//set up collision...
}
This should work. If it doesnt jut post again and we'll try to help.
SuperElectric
Posts: 19
Joined: Fri May 13, 2005 7:20 am
Location: New York, NY

Post by SuperElectric »

Hmm... I want to be able to set up collision detection, but later turn off the collision detection if I need to teleport. Your suggestion, if I understand it correctly, would work if I only needed to teleport at the outset, then could turn on and leave on collision detection forever after that.

-- Matt
DaBestGuest

Post by DaBestGuest »

Can you post the code on where you teleport? It would make it a lot easier.
Post Reply