[ODE] Finding depth of a contact joint

Aras Pranckevicius nearaz at gmail.com
Mon Aug 22 20:52:37 MST 2005


> The best way I've figured out how to do this is to place the composite
> object in the space and then call dSpaceCollide - and determine if a)
> any contact joints exist for that inserted body and b) if they exist,
> whether the inserted body is "penetrating" the pre-existing object.

Why such a complex way?

Why not this one:

  dSpaceCollide (space,0,&staticNearCallbackThatRemembersContacts);

here, in staticNearCallbackThatRemembersContacts you just do not
create contact joints, instead, you do whatever you want with their
information (positions, normals, depths etc.). For example, remember
them for later processing or do some action immediately.

-- 
Aras 'NeARAZ' Pranckevicius
http://nesnausk.org/nearaz | http://nearaz.blogspot.com



More information about the ODE mailing list