[ODE] trilist strategy

Chris Campbell chris.campbell at l8tech.com
Fri Dec 13 01:49:02 2002


> floor of your environment, you run the risk of dropping 
> straight through
> it!

For my game which involves a fast-moving sphere colliding
with tri-mesh, I did a swept-sphere test to find the first 
contact point and manually set the body back to there. 
The penetration distance was hardcoded to a very small 
value to make ODE handle the reaction to the collision.
This is guaranteed to take care of the 'passing-thru' problem 
but due to this not being the way ODE was meant to be
used, it has it's drawbacks. Can't use ODE's collision 
detection routines :( The 'bounce' reaction to the 
collision can look unnatural sometimes, if the first contact 
point was very close to the before-step or after-step 
position (not sure which). Since there is always a non-zero 
penetration distance it cant really be applied to a body
sitting stationary on a slope - the body will always slide
down the slope... etc 

What might be a good idea is to check if a body
is moving at more than a certain speed (say if it moves 
more than it's own length in one timestep) and only then
do something like the above hack...?

ChrisC

ps. game is here www.zppz.com give it a try
(still a few more bugs to fix though)