Top-down vehicle physics
by Joe Bourrie · in Torque Game Builder · 09/19/2005 (5:08 pm) · 3 replies
I am making a top-down view game where I need driveable cars and other vehicles with realistic physics on them. Collision response is easy, but I also need the physics to handle their grip on the road.
On a real car, the frictional force with the ground is much higher when sliding sideways, because the tires don't roll that way. I want to do this same thing with my cars in the game.
- setDamping() will set a damping "friction-like" force that would "emulate" friction, but it is axis-independent and not very flexible, so I think this is wrong.
- As I understand it, friction will only apply when two objects are colliding. In this circumstance, the two objects (car and ground) are always colliding, because it is a top-down view. Should I make a world-sized object that can be penetrated during collision, so that the cars are always colliding with it, or is there a better way?
The other question is: what would be the best way to get that two-axis friction effect (wheels roll forward, but catch if they try to slide)?
Thanks,
Joe Bourrie
On a real car, the frictional force with the ground is much higher when sliding sideways, because the tires don't roll that way. I want to do this same thing with my cars in the game.
- setDamping() will set a damping "friction-like" force that would "emulate" friction, but it is axis-independent and not very flexible, so I think this is wrong.
- As I understand it, friction will only apply when two objects are colliding. In this circumstance, the two objects (car and ground) are always colliding, because it is a top-down view. Should I make a world-sized object that can be penetrated during collision, so that the cars are always colliding with it, or is there a better way?
The other question is: what would be the best way to get that two-axis friction effect (wheels roll forward, but catch if they try to slide)?
Thanks,
Joe Bourrie
#2
09/19/2005 (8:58 pm)
Ok, thanks. Just started with T2D and wasn't sure just how flexible the physics system was.
#3
The point being I'd be happy to correspond with you about car physics in T2D
09/21/2005 (5:36 pm)
If you actually want realistic car physics it gets rather more complicated than your simple example (tire rolling vs lateral skid). I dug up a lot of the relevant information but its not fresh in my head because my own car combat game has been on hold for some months now (reimplementing core objects in C++ rather than script to insure performance is mostly done, but the fun had started to leave so I picked up a simpler project)The point being I'd be happy to correspond with you about car physics in T2D
Torque Owner Smaug
That being said, T2D may actually have tools to help you. For example, it may expose the ability to "hang" one or more forces off of an object. At which point, all you need to do is determine what the extra car forces should be and simply add them to the object in the simulation. Using this method, you can probably still use the T2D collision response.