[ODE] RE: Terrain<->Box collision without tri-collider

McEvoy, Nick nick.mcevoy at dsto.defence.gov.au
Tue Jan 28 17:19:02 2003


Fabian Herb wrote:
>It's probably a good idea to have (multiple) early-exit tests. My own 
>code creates almost ready-to-use contact normals and penetration 
>depths for every triangle it checks, although all, except perhaps one 
>or two, don't collide at all.

Yep.


>But checking every triangle in this manner has some negative aspects:
>- All the collision normals point away direction from the triangle, 
>even if you have edge-edge contacts or a box face colliding with a 
>terrain vertex.

Yes, this is a good point.


>- I don't know how fast this tri-box collider really is (I didn't 
>check out the docs yet), but checking every triangle for its own 
>means checking each terrain edge twice and each vertex between 4 and 
>8 times (depending on if you use alternating triangle direction in 
>the mesh).

Sorry I haven't done any performance testing myself ... but the docs on Fast 3D Triangle-Box Overlap Testing do.

I should have pointed out that my code is *not* currently written for speed ... performance is not an issue for me at the moment ... I just like to get something working first then tune it later.  At the moment I'm writing a game with a JetSki jumping over realtime waves running at a reasonable frame rate ... things might change as I add more JetSki racers though. :(


>Anyway, thanks for your contribution :-)

No worries.

Nick