[ODE] Once more the trimesh vs sphere collision problem

Jon Watte (ODE) hplus-ode at mindcontrol.org
Thu Aug 30 18:32:19 MST 2007


First, you need to implement contact fusion yourself. This means that if 
you have multiple collision contacts that are coincident, you should 
average them all together, and create a single contact joint for that 
location. This will get rid of direction changes across triangle edges.

Second, you ought to add an inertial dampening term, both for linear and 
angular momentum, although it's actually more important for rotation (as 
there is no rolling friction). If you want the ball to not be too 
dampened for minigolf, you can gradually ramp up the dampening amount 
over a few seconds after the ball is hit. This will make the ball roll 
to a stop after a while, much like it would on a felt surface.

Cheers,

          / h+


Johan Öberg wrote:
> Hello everybody. I have been using Ode through OgreOde for a while 
> now. In my mini golf game I have a ball (sphere) rolling on a ground 
> (trimesh). When the ball rolls over a triangle edge it changes 
> direction. I have been able to minimize this problem by changing 
> simulation parameters, but there is one problem I can't get totally 
> rid of. Around the hole-area there are lots of thin triangles, and 
> sometimes the ball gets stuck between two edges and refuses to come to 
> a rest.
>  
> Last time I read about this problem noone had solved it. There was 
> some suggestions of commenting out some code in ode, but that didn't 
> work for me.
>  
> If I had anywhere near the knowlage required I would try to solve it 
> myself, but I'm just too far off.
>  
> If anyone has an idea how I could solve this (And I would probably 
> need quite an explicit answer) I would be very greatful!
>  
> Have a nice day, Johan.
> ------------------------------------------------------------------------
>
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://ode.org/mailman/listinfo/ode


More information about the ODE mailing list