[ODE] Contact Direction

Jon Watte (ODE) hplus-ode at mindcontrol.org
Fri Oct 26 10:14:32 MST 2007


fDir1 is something you provide yourself, if you want to use anisotropic 
friction, or an assumed contact surface movement vector. (Useful for 
traction in wheel simulations, for example)

The "direction" of a contact is the normal you get back from the 
contactgeom. Or you can take the point velocities of the two objects 
(there's a function to get the velocity of a given point on a given 
body) and subtract them from each other.

Cheers,

          / h+


Rémi Chaignon wrote:
> Hi all,
>
> 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?
>
> Thanks for your help,
>
> Remi.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://ode.org/mailman/listinfo/ode


More information about the ODE mailing list