[ODE] Ray question

kurimail kurimail at arrakis.es
Thu Jun 8 12:46:14 MST 2006

If you are talking about changing the ray length while detecting
collisions, i think that the collisions are compute all at the same time.

And for the next callback, you don't know if there will be an object at 2

I am not sure if there is one way to tell the ray to obtain only the first
contact... i thought that rays only returned one contact :S

> Hi,
> I'm using ray to simulate a distance sensor, the ray is from 0 to 5
> meters.
> To determine what is the nearest object, i look in the nearcallback what
> is
> the current detected object, if the distace is less than the last computed
> the the "really" near object is the new one ... i think it's the good way
> (no ?)
> Question:
> when i find a contact (in the near callback) at (for exemple) 2 meters
> from
> the ray position, is it a good optimisation to change the length of the
> ray
> (using dRaySetLength) to down it to 2 meters ? To avoid detection after  2
> meters.
> Laurent.
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode

More information about the ODE mailing list