Simple Collision Questions

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
Andrei
Posts: 7
Joined: Wed Feb 10, 2010 3:26 am

Simple Collision Questions

Post by Andrei »

We're still trying to wrap our heads around the collision framework.

1) Is there a simple way to change a call to getSceneNodeAndCollisionPointFromRay to test against the bounding box only, and not the mesh itself?

2) Is there a way to figure out all scene nodes whose bounding boxes overlap, or will we have to iterate over all scene nodes ourselves to do so?
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

1.) No. You can use getRayFromScreenCoordinates and then check it against getTransformedBoundingBox of all your nodes with the intersectsWithLine function of aabbox3d.

2.) You have to iterate. And very likely you will have to use some additional clustering.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply