[ODE] Implementing vehicle physics on a terrain......

Nate W coding at natew.com
Wed Aug 6 20:01:57 2003


On Thu, 7 Aug 2003, Sandeep KL wrote:

> to implement vehicle physics on a huge terrain, how do i go about doing it?
> 
> do i have to add all the triangles around the moving object into the solver 
> or do i add the entire terrain planes into the solver??

I created a terrain mesh using the tri-list geometry object.  I also used
the Demeter terrain engine to load the heightmap from an image, and to
render the terrain.  The only interesting part was moving the triangle
mesh data from Demeter to the tri-list.  I posted an algorithm for this
quite a while ago, but if you search the archives it shouldn't be hard to
find.  

The algorithm is not quite correct though, I think I used the wrong
diagonal when creating pairs of trangles between four points.  It works,
but in sharp corners it's clear that the rendered terrain is not quite the
same as the collision-detection terrain.


-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com