[Resolved] Object Colliding with other one

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
Keil
Posts: 20
Joined: Fri Nov 25, 2005 2:46 pm
Location: France

[Resolved] Object Colliding with other one

Post by Keil »

Hi,
I've set 2 md2 models in a ms3d world
md2 model 1 is animated and is collidable
ms3d world is collidable

md2 model 2 is controlled by user and react to collidable objects.

i want to know, when i type Enter for example, if my two md2 models are colliding.

what is the test to write ?

Code: Select all

if( ??????????????? )
   printf("Colliding\n");
else
   printf("Not Collinding\n");
Last edited by Keil on Sun Jan 08, 2006 10:33 pm, edited 1 time in total.
Get stronger confronting stronger ones
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

for a quick and dirty test to see if pressing enter should open a door or something...
if (node1->getBoundingBox().intersectsWithBox(node2->getBoundingBox()))
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Keil
Posts: 20
Joined: Fri Nov 25, 2005 2:46 pm
Location: France

Post by Keil »

it was the first thing i tried, but anywhere my 2nd md2 model (which one i can move), anywhere he can be, the result is the same: colliding=true
Get stronger confronting stronger ones
Keil
Posts: 20
Joined: Fri Nov 25, 2005 2:46 pm
Location: France

Post by Keil »

ok, just find the way:
if(node1->getTransformedBoundingBox().intersectsWithBox(node2->getTransformedBoundingBox())
Get stronger confronting stronger ones
Post Reply