[ODE] Ray / Sphere test problem

Eike Decker zet at cube3d.de
Wed Dec 1 20:46:00 MST 2004


Thanks you for your quick help, problem is solved: I did not use a normalized
vector for the direction. The documentation didn't explicitly say that it must
be in units length, so I didn't take care of that. Interestingly, the
sphereclass seems to be the only class that has a problem with this.

Eike

> 
> It should be really simple to create a 20-line program that attempts
> to reproduce the problem, by creating two geoms and configuring them
> explicitly, then calling dCollide() and seeing what happens. (Aren't
> there already unit tests for these things, btw?)
> 
> That being said, the first thing I'd check would be that the direction
> of my ray is actually unit length. If it already is, then I'd write
> that little test program, and post the program and the results to this
> list.
> 
> Cheers,
> 
> 			/ h+
> 
> 
> -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Eike
> Decker
> Sent: Wednesday, December 01, 2004 10:37 AM
> To: ode at q12.org
> Subject: [ODE] Ray / Sphere test problem
> 
> 
> Hi
> 
> I want to make a ray test, but this is somehow not working. My ray seems to
> intersects with spheres that are impossible to intersect with the ray. I
> read
> out the sphere radius of my interesection and it is correct, but the
> hitpoint I
> am getting is much too far away from it to be the real hitpoint. This error
> always occures, no matter if I am using dCollide(geom,space...) or
> dCollide(geom,otherGeom...). Of course I could discard such hits easily by
> checking the distance but this will discard any spheretest...
> The error does not occure when I use a ccylinder instead of the ray, but
> this
> one lacks the needed accuracy.
> 
> I am using the official single precision DLL Build.
> 
> I couldn't find any subject relating to this, but I am a poor googler, so
> please
> forgive me if this topic was discussed earlier.
> 
> Anyway- am I doing something wrong? The ray intersects perfectly with any
> other
> object in my scene (I am currently using trimeshes and ccylinders). The rest
> of
> ODE is working as expected, too (cars & collision with
> boxes/spheres/ccylinders/trimeshes) works fine.
> 
> Eike
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
> 
> 





More information about the ODE mailing list