[ODE] Bounce and trimesh

Eike Decker zet at cube3d.de
Sun Dec 5 12:44:52 MST 2004


Hi

The trimesh can be passed by the sphere because it has no volume info. If the
sphere was at the previous step on the "other" side of the trimesh this is not
recognized by ODE (it recognize this case with primitive object collisions).
There's a dTerrain class for heightmaps, but don't ask me how to use it. 
To solve your problem with the trimesh, you have to make sure that
 * Your simulationtimesteps are small enough to prevent the sphere passing the
trimesh without successfull collisioncallback (stepsize depends on your
simulation)
 * Increase the ERP, since it'll push back the objects with more force when a
collision occures
 * play with the CFM
 * Make sure your objects (sphere) have a minimum size (don't allow small
objects)
 * Make sure your objects are not too fast
 * Use dTerrain objects instead of trimeshs (wish I knew how to use them)
These are quite simple ways of decreasing the possibility of clipping - there
are other more complicate ways, too.

Eike

> Hi all,
>  
> I'm trying to simulate a "rubber ball" moving at high velocity towards an
> object. I seem to be able to do this just fine using a sphere and and a box
> by messing with the bounce parameter in the collision callback.
> However, this behaves completely different if I replace the box with a
> trimesh. In that case the sphere does not bounce back very much at all.
>  
> How would I go about accomplishing the same effect when colliding with a
> trimesh?
>  
> Thanks...
>  
> 
> 		
> ---------------------------------
> Do you Yahoo!?
>  All your favorites on one personal page – Try My Yahoo!





More information about the ODE mailing list