[ODE] Holding bodies like in HL2

David Walters hidden.asbestos at googlemail.com
Wed Sep 13 03:59:44 MST 2006

> So how to get the `nearest colliding body which isn't the player`?
> Any ideas?

Simple, you have a dReal value, initialise it to your maximum allowed
range (eg. FLT_MAX) and then for each collision if the ray 'depth'
(which actually means distance) is less than this max value then
update it - unless, the collision is with a geom that is part of the
player (use dGeomSetData to help with this) in which case you ignore


More information about the ODE mailing list