Is model collided with model

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
reiskaG
Posts: 4
Joined: Thu Dec 21, 2006 4:25 pm

Is model collided with model

Post by reiskaG »

My first language is finnish...

I can't find anything good from this forum to solve this problem. I have MetaTriangleSelector which has two TriangleSelectors and I have CollisionResponseAnimator. I want to know if the other TriangleSelector and camera collide.
Xharock
Posts: 71
Joined: Wed May 10, 2006 3:50 pm

Post by Xharock »

You need to apply a Collision Animator to the camera using the second TriangleSelector.
reiskaG
Posts: 4
Joined: Thu Dec 21, 2006 4:25 pm

Post by reiskaG »

Hmm, I mean need something like this.

Code: Select all

if (collisiondetected(selector, camera)) 
{
    hit()
}
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

ISceneCollisionManager::getCollisionResultPosition() can help. It will give you the new position of a moving sphere. If a collision occured, the position returned would be different than the position that you passed in.

You could also copy/paste the CCollisionManager::collideWithWorld() method and modify it to fit your needs.

If your selector represents a single convex object, you could just do a bounding box collision test.

Travis
reiskaG
Posts: 4
Joined: Thu Dec 21, 2006 4:25 pm

Post by reiskaG »

And how this bounding box collision test works?
Post Reply