[ODE] Heightfield / Collision.

Pierre Terdiman p.terdiman at wanadoo.fr
Wed Feb 19 01:22:01 2003


> This is exactly the case I was thinking of, so let me attach a rough (hand
> drawn) picture.  I'm thinking that if the two resulting face contact
normals
> (green and blue) are combined, you do get the right resulting normal,
right?

Another approach is to use a point-triangle distance routine, where the
point is the sphere's center. The code then returns the closest point CP on
the triangle, which gives a normal by computing |Center - CP|. Imagine a
single triangle (say the one with the green normal), that directly gives a
normal in the same direction as your red one. With the two triangles in your
picture you can indeed average computed normals. Works fine.

Ex: www.codercorner.com/PhysicsTest.zip

Especially :
Physics_StressTest09.zcb
Physics_StressTest09b.zcb

- Pierre
www.codercorner.com