[ODE] Car simulation (with no wheels) - clever ideas needed

James Golding jamesg at epicgames.com
Fri Mar 19 14:14:32 MST 2004


For Unreal Tournament 2004 we used Karma for the vehicle, which is very similar to ODE. We just use 
1 rigid body for each vehicle, and no wheels bodies or joints or anything.

For each wheel I do a line check down, and place a contact if the line hits anything (the hit result 
gives you penetration and I point the contact normal back up the line direction). You can then 
fiddle the contact properties so that the primary direction points in the 'forward' direction of the 
wheel (and change it when you steer). When the brakes are off, turn off friction in that direction. 
You can play with friction/slip per-frame based on relative velocity/tire load etc. Adjusting the 
contact stiffness and scaling the penetration gives you suspension. Then outside the physics engine 
you can have a 'wheel speed' for each wheel which you use to update the graphics, and update that 
based on some kind of engine model hooked up to the controls.

James


DjArcas wrote:

> Hullo physics peeps,
> I'm in need of a simple car simulation, and I'm not sure quite where to 
> start. A box with 4 hinge2's with 4 spheres attached to it is much more 
> expensive than I'm wanting for this game, so I'm thinking about a single 
> box that I can move about. I can perhaps get 30 cars with 4 wheels and 
> suspension going at 60 fps, which isn't going to be enough, especially 
> in pileups.
>  
> For the car to handle reasonably correctly, I will be applying the push 
> force between the two front 'wheels', at an angle that represents the 
> steering angle.
>  
> I believe that I can have a low slip1 and high slip2 angle, to 
> 'encourage' the car to go forwards, rather than slipping sideways. I'm 
> stuck here, however, and the car handles like a hovercraft. Anyone got 
> any helpful advice... please?
>  
> Adam
>  
> -------------------------------------------------
> Next stop, Fantasy Land!
> On your right you can see
> the happy trees and the
> singing children. On your
> left, free candy for everybody!
> Yippeee!
> -------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list