[ODE] Hovercraft?

Nate W coding at natew.com
Thu Aug 29 10:27:02 2002


On Thu, 29 Aug 2002, Clay Larabie wrote:

> I don't have an answer for you, but I'm interested in the same thing, so I'd
> like to hear any responses the ODE folks have, as well as any approaches you
> end up taking.

I was working on a snowboarding game a couple/few months ago for which I
used *much* simpler physics code.... the motion of the snowboarder's body
sounds a bit similar to what you guys are doing with a sci-fi-style
all-terrain "hovercraft."  I just implemented a spring-and-damper force
between the center of the snowboarder's body and the surface of the
terrain.  This made the snowboarder follow the terrain reasonably well,
with a nice low-pass-filter effect that mimics what your knees do.

For a hovercraft, you might try putting damped springs at each corner of
the chassis.  Look at the surface normal directly below each corner of the
chassis, and at the distance between the points on the ground and chassis.  
Use the normal for the spring direction... if the actual_ride_height is
less than desired_ride_height, make the spring force proportional to
((desired_ride_height - actual_ride_height) - damping), where damping =
vertical component of the velocity of that corner of the hovercraft
chassis.  Apply the force to the corner of the chassis in the direction of
the ground's surface normal.

No promises (I'm making things up as I go along again) but it's worth a
shot.  It seems to me that the forces you're wanting should come from the
application code, rather than from ODE itself.  Just use ODE to handle the
hovercraft's behavior as a result of your application-defined external
forces (and things like collision detection).

-- 

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