[ODE] triangles and ellipsoids and things

Squint squint at squint.clara.co.uk
Fri Mar 28 13:13:02 2003


First off, thankyou to the two who responded to dxTriangle - it was the
normal in the end, although it was more complicated than just 'wrong way
round'. I now have spheres bouncing off an arbitrary mesh quite nicely, and
have to avoid being mesmerized by my own program. If anyone really cares, I
have 3 humongous screenshots at http://www.squint.clara.co.uk/bounce.html

Right. The shape I want, for a user controlled avatar, has a circular cross
section as viewed from "on top", since this prevents it bumping its nose
when turning around, and prevents really rapid sweeps of the mouse from
using a tail plane like a cricket bat, for example. A sphere is somewhat too
poor an approximation, however. This leaves me with Capped Cylinders and
'normal' cylinders. I really don't relish the thought of making normal
cylinders collide with a triangle mesh, and a Capped Cylinder is too tall (I
want a short fat object - CCylinder is good for a human, but not for a sleak
looking hovercraft).

Now, I can make a stretched sphere (an ellipsoid?) collide with a triangle
mesh fairly efficiently, but I can't make it collide with other ellipsoids,
or spheres, or indeed just about anything with curves in.

Does it sound reasonable to have a body which collides with the mesh using
an ellipsoid (in one space), and collides with other bodies using spheres
(in a second space)? I can just invent spherical shields as an excuse, no
problems there, but is the system likely to have problems with the geometry
of my body changing depending on what it is colliding with?