[ODE] Collision impact force

Tyler Streeter tylerstreeter at gmail.com
Tue Dec 21 08:40:08 MST 2004


Try using the dContactGeom's penetration depth variable.

dContact c;
dReal depth = c.geom.depth;

I've used this for sound volume, and it seems to work pretty well. 
Note that the depth's range is dependent on other factors like ERP and
CFM (thus, the step size is important), so if you change those things,
you'll probably have to tweak how the penetration depth affects the
sound volume.

Tyler


On Tue, 21 Dec 2004 11:24:27 -0300, Rafael Horbach
<rafael at southlogic.com> wrote:
> I'm looking for a "impact force" information, so I can put sounds and
> other effects when and where an impact is happening. I could not find
> any support for that in ODE, has anyone a clue about it?
> 
> One thing I have is the "dContact" information, but it has no "strength"
> of the impact. Of course, I can use the velocity of the bodies, but it's
> somehow complex to get the information I need, since I have the angular
> velocity too.
> 
> I think I can use some of functions on ode to get a body velocity at a
> given position, I think I'll try something like that, but has ODE a
> better solution?
> 
> Thanks!
> ________________________________________
> Rafael Horbach (rafael at southlogic.com)
> Southlogic Studios (http://www.southlogic.com)
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>


More information about the ODE mailing list