I have a (hopefully very silly) question about a collision detection problem that I'm unable to solve myself
I need to check collisions between a (well, some) tri-mesh based moving object and a very simple fixed 3d "dungeon". The "dungeon" has a flat floor (a simple plane, trivial to check collisions there) and some tri-mesh walls around (walls can be very long and complex, however their triangles are mostly oriented in vertical). There are plenty of examples about reducing the complexity of collision checks (through trees and so) and I've already cut the problem down to just checking some (few) triangles of my 3d object against some (few) triangle candidates of the wall.
Again, checking triangle-triangle collisions is quite trivial (there are plenty of examples and algorithms around), but my problem is that my physics engine needs compenetration to calculate collision forces so I need to know not only where collision points are (easy), but also "how deep" the collision is and the collision "normals" in order to apply collision forces that "bounce" the object off the wall.
Now, this is a bit of a problem because if I cut down the problem to just a triangle-triangle collision it becomes difficult to get the right amount of compenetration and, most important of all, the right colliding "normal"; as an example, in a triangle that belongs to a perfectly flat wall surface I can get (depending on how the triangles of the object mesh are compenetrating the wall) a triangle side-to-triangle side collision, with a collision "normal" pointing in an "impossible" physical direction. In such a collision the only "right" normal would be the wall triangle normal, because the triangle is part of a wider flat surface and its sides cannot "generate" collision points, but how can I avoid this in the last, triangle-triangle collision detection step?
I've tried to investigate the gjk method but this only works for convex shapes and my walls are too complex to be reduced to convex pieces (they may be long and very twisty, with a complex local surface), so a triangle-triangle based algorithm would be preferable; anyone has any idea on how to solve this problem?
Thank you very much for any help!
lastcodewarriorMember Since 06 Jan 2008
Offline Last Active May 03 2012 04:42 AM
- Group Members
- Active Posts 5
- Profile Views 696
- Submitted Links 0
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
lastcodewarrior hasn't added any contacts yet.