[ODE] New stuff

Erwin de Vries erwin at vo.com
Mon Aug 19 04:41:02 2002


You are partly correct Martin. I was kinda in a hurry when i wrote my
previous mail, so here's a better description.

The raycollider gives you:
- The position of the impact in the pos field.
- The reflection normal in the normal field.
- The distance between the position and the endpoint of the ray in the depth
field. This is only for convenience. You could easyly calculate this value
yourself, but this value is available after the computations, so i thought
it would be nice to include it.
- The geometries that hit in the g1 and g2 field.

Remember that the raycollider can return multiple contacts. For convex
primitives this is the place where it enters the primitive, and where it
leaves the primitive. It is guaranteed that the first contact is the closest
to the origin of the line though. However, this can only be guaranteed on a
per primitive basis. If you collide a ray with a space contacts can appear
in random order, and the sorting is up to you. This needs to be fixed
somehow.

Remember NOT to use the ray for any dynamics computation. Its only useful
for collision detection.

Hope that explains.
Erwin

----- Original Message -----
From: "Martin C. Martin" <martin@metahuman.org>
To: "Thomas Harte" <thomasharte@lycos.co.uk>
Cc: <ode@q12.org>
Sent: Monday, August 19, 2002 01:49
Subject: Re: [ODE] New stuff


> Because the ray isn't an ODE geom (unless I missed something), it isn't
> part of the regular collision and dynamics system in ODE.  It could be
> used, e.g. in a shooting game to see what a bullet hits, or when someone
> click on a screen to find out which object is clicked on.  Sometimes you
> want to find out the 3D location of where the hit happens.  You can
> compute that from this "penetration depth."
>
> Perhaps calling it penetration depth is confusing?  Maybe it should be
> renamed?
>
> Just a thought,
> Martin
>
> Thomas Harte wrote:
> >
> > > The dRay class now returns reflection normals, and penetation depths.
The
> > > penetration depth of a line is the distance between the contactpoint
and the
> > > endpoint of the line.
> >
> > I'm sorry, I have not tried your code, but is this not incorrect? My
reading of the various
> > documentation was that penetration depth was distance along the normal
vector, so that
> > ODE can discreetly apply a penalty method. i.e. the amount you'd want
would be
> >
> > (endpoint - contactpoint).(plane normal)
> >
> > not, what you seem to be saying :
> >
> > | endpoint - contactpoint |
> >
> > I bring this up mostly because I am new to ODE and am wondering - have I
> > misunderstood what the penetration depth information is for?
> >
> > -Thomas
> > ______________________________________________________
> > Check out all the latest outrageous email attachments on the Outrageous
Email Chart! - http://viral.lycos.co.uk
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>
>