[ODE] fake car physics

David Salz david.salz at bitfield.de
Sun Aug 7 20:23:54 MST 2005


Thanks for the answer! I already know Carworld and it certainly helped me a
lot. One major problem I have at the moment is that when I hit a wall my car
bounces back, flips over or comes to a complete stop. While this may be
correct, it is not what I want. I would like the car to keep "sliding" along
the wall in the right direction - or maybe bounce back a bit, slow down a
bit but keep going in the right direction anyway. Has anyone done something
like this?

David

> -----Original Message-----
> From: Megan Fox [mailto:shalinor at gmail.com] 
> Sent: Sunday, August 07, 2005 8:04 PM
> To: David Salz
> Cc: ode at q12.org
> Subject: Re: [ODE] fake car physics
> 
> (Most of these concepts can be found in "Carworld," an ODE demo that
> was made to answer exactly this sort of question:
> http://www.mindcontrol.org/~hplus/carworld.html)
> 
> If you want something like Unreal Tournament 2004's or GTA's vehicles,
> all you need is a box with 4 rays being cast downard at each of the
> four corners.  You simulate a spring system at each of the 4 rays,
> simulate the friction of the "wheels", force application to the body
> due to said frictions, and everything else - since you're in control
> of everything, you can determine exactly how it behaves.
> 
> Ironically, it ends up being a lot more work to simulate a "fake" car
> than a physically accurate car... but you kind of need to do most of
> this work to make a nice-handling car anyways, and it's faster than a
> full sim car.
> 
> Concepts of note include:
> 
> - anti-sway torque: as the body leans, you apply counter-torque to fix
> the lean.  You can effectively disable roll-overs this way (just apply
> unlimited counter-torque past a certain tilt point) if that's your
> goal, and by controlling the torque application curve you can simulate
> any number of easy or hard-to-rollover vehicles.
> 
> - center of mass: use dGeomTransform's to make your center of mass
> somewhere low.  If you want a weeble-people car, you can displace it a
> good deal below the ground even.
> 
> - turn stability: turning at high speeds can often cause rollovers in
> a sim.  This is realistic, but unfun.  You can modify your max
> correctional torque by the wheel turn to help eliminate this, but
> still allow average "I just got T-boned" rollovers.  Incidentally,
> this gives you GTA-esque "Steer into the lean to prevent just about
> anything from rolling over, no matter how far it's tipped" physics,
> which I find quite agreeable.
> 
> -Megan Fox



More information about the ODE mailing list