Re: Contact Direction

Krystian Ligenza <[email protected]> Fri, 26 Oct 2007 09:47:02 +0200
Newsgroups gmane.comp.lib.ode
Message-ID <[email protected]>
> I would like to know how to get the direction vector of a contact.
>
> In the Nearcallback, in the contact loop, I set the contact surface 
> mode to "dContactFDir1". Once the contact is created, I want to check 
> the position and the direction of the contact, the position 
> (contacts[i].geom.pos) is correct, but it seems that the direction 
> (contacts[i].fdir1) hasn't been set.
>
> What am I doing wrong here? Is that how I can get the direction of the 
> contact?
>
Look more carefully at contacts[i].geom. It is a dContactGeom, and 
besides of "pos" (contact position), it also have "normal", "depth", 
etc. I think that "normal" is vector that you are looking for.

Cheers,
Krystian