[ODE] How can I know the depth of a collision?

Hampus Soderstrom hampus at sxp.se
Sun Mar 19 19:40:02 MST 2006


Hi Gussimulator,

Search for penetration depth in the doc. The info is available.

In your callback function dCollide returns number of collisions for  
two geoms. Maby that is sufficient for your needs.

cheers

Hampa
toribash.com



20 mar 2006 kl. 02.38 skrev Gussimulator:

> I would like to know how deep a collision was, is this possible  
> within ODE?
> What should I do in order to get this important info from ODE?.
>
> Also how would you go to get the amount of collisions (collision  
> count) ?
>
> Something like the following I mean: dBodyGetCollisionsCount()
> And dBodyGetCollisionDepth()
>
>
>
>
> the following snippet from an ODE wrapper:
>
>
> count = ODE_dBodyGetCollisionsCount(box)
>   For i = 0 To count - 1
>    depth# = ODE_dBodyGetCollisionDepth(box, i)
>    If depth > 0.05
>     snd = PlaySound(sound)
>     ChannelVolume snd, depth * 10
>     red# = depth * 255 * 3
>     If red# > 255 Then red# = 255
>    EndIf
>   Next
>
>
> (not in C i know...)
>
> those 2 would be useful to have builtin I think.
> But apart from the suggestion, how can I get the depth of a  
> collision?.
>
> Thanks.
> I really wont pay for an ODE wrapper you know... ODE is OSS...
>
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list