[ODE] First steps and collision management.

Zanshin gzanshin at gmail.com
Fri Jan 12 14:30:35 MST 2007


It works perfectly, thanks very much.

So, not knowing anything about 3d graphics of game physics, in a couple of
hours, I've got a meteorite (the only .x file I could find around) falling
to an invisible ground (drawing ground seems to be a bit harder) and almost
stopping there (it kind of vibrates).

//--Code
public void Collision(ContactInfo[] ci, Geom g1, Geom g2)
        {
            Contact c;
            foreach (ContactInfo cInfo in ci)
            {
                c = new Contact(w, cInfo, ContactJointGroup);
                currentContacts.Add(c);
                c.Attach(g1.RigidBody, g2.RigidBody);
            }
        }
//-----------

On 1/12/07, Jon Watte (ODE) <hplus-ode at mindcontrol.org> wrote:
>
> 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+
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mooshika.org/pipermail/ode/attachments/20070112/cc89ac80/attachment.htm


More information about the ODE mailing list