[ODE] Trimesh collision with fast moving object

Michael Lacher michael.lacher at hlw.co.at
Fri Jan 12 04:38:50 MST 2007

ODE does not have any built-in support for detecting "thin wall" 
problems (like a swept volume collision test). But you have some options 
for faking it:

* Since your object is a ball, the conforming swept volume would be a 
capsule. use a capsule as collision primitive with one end where the 
ball was last frame and the other end where the ball is now. This 
capsule will correctly report all collisions during the timeframe, but 
you might need to change the normals/points of the collision info manually.

* Perform a manual raycasting from the old to the new pos. If the 
raycast reports an intersection but the ball did not, manually modify 
the position of the ball to where it would just touch the obstacle, and 
create a contact with an apropriate normal (with luck the contact 
reported by the raycasting should be exactly what you need).

Since the ray is just a line, you might miss cases where the ball goes 
past a corner (ie: ball would hit, but line does not), but should work 
in practice (at least i have managed to solve the same problem with it 


Johan Oberg wrote:
> Hi!
> I suppose this has been discussed before, but I couldn't find anything
> on the mailing list. I'm doing mini golf and the balls radius is only
> 21mm. The walls/obsticles on the golf holes are trimeshes. It's quite
> possible the ball will travel with a speed of up to 8 m/s. Even with
> quite a high simulation rate, the ball will easily move through a wall
> or obsticle at that speed.
> Example:
> Ball speed = 8000 mm/s
> Sim Hz = 120
> 8000/120= 66.67mm
> What can I do to solve this situation other then upping the simulation
> speed? I can't use anything other then trimesh for my obsicles.
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://mooshika.org/mailman/listinfo/ode

Michael Lacher

Gryps Engine: http://engine.hlw.co.at
ODE commercial support: http://engine.hlw.co.at/odesupport.htm

More information about the ODE mailing list