Collision Response with Multiple Meshes?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Marc
Posts: 25
Joined: Wed Feb 11, 2004 1:03 pm
Contact:

Collision Response with Multiple Meshes?

Post by Marc »

Hi !

Is it possible to let a scenenode response correctly to the collision with more than one Mesh?

This thing irr::scene::ISceneCollisionManager has a method getCollisionResultPosition that calculates the position after sliding along a Mesh. But this Method wont work if there is more than one Mesh to collide with.

Perhaps adding multiple of these
irr::scene::ISceneNodeAnimatorCollisionResponse
to a scenenode might work, but if its implementation relies on the upper one, the results are probably wrong.

So how can we do that? E.g. responde correctly to collision of the map and other objects, like players or enemies?

Marc
2D-Splatter-Action => http://www.walkover.de.vu <=
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

instead of handing it one TriangleSelector containing a single mesh, you need to give it an IMetaTriangleSelector.

The IMetaTriangleSelector should have within it all of the TriSels to all of the meshes you are concerned about colliding with.
a screen cap is worth 0x100000 DWORDS
Marc
Posts: 25
Joined: Wed Feb 11, 2004 1:03 pm
Contact:

Re: Collision Response with Multiple Meshes?

Post by Marc »

Ah cool, missed that one. Thx
2D-Splatter-Action => http://www.walkover.de.vu <=
Post Reply