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
Asterisk Man

Collision Detection

Post by Asterisk Man »

I have a question: How do you use triangle selectors for collision detection with more than one node? IE: Check boundaries with the world, as well as a mesh. I checked the tutorial, but it only shows how to check for collisions between the camera and the map, not between the camera and the meshes (you can walk right thru them).

Tnx for any help in advance.
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

I think, you can add a OctTree to this meshes, too
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Asterisk Man

Post by Asterisk Man »

I dont think you need Oct Tree for those meshes, but I get what you are atlaking about, however, wouldnt this new animator overwrite the world collision detection?
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

Don't know. But I think you can add as many animators (even if the are the same class) as you want.
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Asterisk Man

Post by Asterisk Man »

Yup, that worked, I just didnt think that you could have more than one animator working on a node at any time... im such a goof! Tnx man.


Now, I was thinking of alternative ways of doing collision detection, such as using the bounding boxes, however, every time I call the function node1bb.intersectsWithBox(node2bb), it returns true, no matter if the 2 nodes are colliding or not. Am I just using the function incorrectly?
bcorbett
Posts: 1
Joined: Sat Jun 19, 2004 2:54 pm

Post by bcorbett »

Asterisk Man wrote:Now, I was thinking of alternative ways of doing collision detection, such as using the bounding boxes, however, every time I call the function node1bb.intersectsWithBox(node2bb), it returns true, no matter if the 2 nodes are colliding or not. Am I just using the function incorrectly?
Are you getting the bounding box using ISceneNode->getBoundingBox or ISceneNode->getTransformedBoundingBox? If you don't use getTransformedBoundingBox, I think you'll get the bounding box cenetered at the origin, not in absolute coords.
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

The easier way to do this would be to create a MetaTriangleSelector which will treat several triangle selectors as one.
Post Reply