[ODE] First steps and collision management.

Jon Watte (ODE) hplus-ode at mindcontrol.org
Fri Jan 12 14:11:11 MST 2007


You need to attach the contact joint to the body that's colliding, and 
the body it's colliding with (or NULL, if it's colliding with static 
geometry).

Cheers,

             / h+


Zanshin wrote:
> Ok, I created a contact joint group and added the joints to it in the 
> Collision event. However this makes no sense The JointGroup is never 
> linked to the world or the space so how could stepping the world take 
> them into account? There must be something else; some way of linking a 
> JointGroup to a world o space.
>
>
> //----
> // No need to read. Beyond this point there's just a part of the code 
> described in the text.
>
> //ODE.Joints.JointGroup ContactJointGroup = new JointGroup();
> //List<Contact> currentContacts;
> public void Collision(ContactInfo[] ci, Geom g1, Geom g2)
>         {
>             foreach (ContactInfo cInfo in ci)
>             {
>                 currentContacts.Add(new Contact(w, ci[1], 
> ContactJointGroup));
>             }
>         }
>
> On 1/12/07, *Justin Bailey* <jgbailey at gmail.com 
> <mailto:jgbailey at gmail.com>> wrote:
>
>     One thing it looks like you are missing is adding contact joints to
>     the world when they collide, and removing them afterwards. Maybe
>     s.Collide() does that already, though.
>
>     I have experimented with Tao.Ode (which just wraps the C ODE dll) and
>     have had problems in this area too. Even after adding the contact
>     joints, collisions didn't seem to matter. My sphere object always
>     falls through my ground object :(
>
>     Hopefully someone can help analyze what's missing in your code and I
>     can apply it to mine.
>     _______________________________________________
>     ODE mailing list
>     ODE at ode.org <mailto:ODE at ode.org>
>     http://mooshika.org/mailman/listinfo/ode
>     <http://mooshika.org/mailman/listinfo/ode>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://mooshika.org/mailman/listinfo/ode


More information about the ODE mailing list