[ODE] Boxiangle collision

Erwin de Vries erwin at vo.com
Thu May 2 15:13:02 2002


Have a look at the trianglecollider in the contrib directory. It somewhat
solves the problem you're describing. If you want the perfect solution
you'll have to code it yourself (and open-source it! :), but it works pretty
well for our (racing)games, and a couple of other people appear to have
success with it as well.

Erwin

----- Original Message -----
From: "Ruud van Gaal" <ruud@marketgraph.nl>
To: <ode@q12.org>
Sent: Thursday, May 02, 2002 23:41
Subject: [ODE] Boxiangle collision


> Hi all,
>
> I have some trouble with colliding a box and a triangle.
> I have a car with a bounding box (OBB) which can hit polygons on the
track.
> The track consists of all triangles, but since a dBoxTriangle (or
> dCollideBT) is missing, I'm generating contact points using the plane of
the
> triangle and using dCollideBP() (Box vs. Plane).
>
> Problem is that if you hit a barrier straight on, the plane is infinite
and
> dCollideBP() thinks the box is way inside the plane, giving explosive
> constraint forces:
>
>   |  | barrier
>   |  |
>   ----/\
>      /  \
>      \  /  <=car box
>       \/
>
> Above, you can see that as the car softly hits the barrier triangle, the
> barrier plane actually extends deep into the box, giving big penetration
> depths.
>
> Does anybody have a box vs. triangle collisions function, or some idea how
> to tackle this? Driving against a barrier now is just scary. ;-)
>
> Thanks,
> Ruud
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>
>