#### Archived

This topic is now archived and is closed to further replies.

# need help / most basic car physics

This topic is 5267 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

more like hover craft physics, I want to know what the idea is behind making a vehicle leap off of a ramp, or cliff, or hill. I think if someone could assist me with some knowledge on this, then I could probably figure out the rest of the physics(sounds concieted i know, sorry) as far as cars go. simply, and simple. (mabey im a simpleton, i hope not) I want to know what the idea is behind making a vehicle leap off of a ramp, or cliff, or hill. I have my velocity vector at hand.

##### Share on other sites
Did you allready do a forum search for the keywords "car physics"? Some of the threads that show up there should contain usefull information.

##### Share on other sites
If you know how physics works a car leaping off a cliff isn''t a technique it just happens. And no, you don''t sound concieted just misguided. The leaping part is entirely insignficant and natural. While collisions, friction, torque, etc. is 99.9% of it.

So read up on newton and join us here in the 18th century, ah I forgot this is the 21st.

##### Share on other sites
You need to learn the basics of physics and some maths to understand vector motion.

3 dimensions is described in 3 mathematical dimensions, x, y, and z. So if an object has a velocity of 3, 0, 0, it is moving at 3 units of measurement every unit of time, for example 3 km/h. This velocity alters the position vector, so in the first second if the position was 0,0,0, the next second it will be 3,0,0, the next second 6,0,0, then 9,0,0, etc, until the velocity changes.

Acceleration modifies velocity, so an acceleration of -1 applied on the x dimension will mean that the first second the velocity will be 2,0,0, then 1,0,0, then 0,0,0, then -1,0,0, etc, until the velocity changes.

Gravity is a constant force of acceleration, accelerating objects toward the ground at 9.8 meters per second. Up and down is usually the y dimension, so if an object is held above the ground at 0,0,0 velocity, then dropped, after one second its velocity will be expressed in 3 dimensions as 0,-9.8, 0 (in meters per second).

The mechanism of getting a car to jump off the ground, if the car is following the contours of a map, you set its upward velocity to equal the change in height since the last unit of time, so if it goes up a ramp that is 3 meters high in one second, its upward velocity is equal to 3. But also each second the object is in the air you will be applying the downward force of gravity onto the object.

This is all simplified, and you probably need to read some books on maths, mainly pythagoras and unit circles, (for understanding sin, cos, tan, etc, to work out directions to apply forces). Also you need to get a book on introductory physics, and concentrate on areas covering motion in 2 dimensions. Motion in 3 dimensions is the same, you just work out the x,y axis then the x, z, or whatever.

Do some reading. Then have a look at how other programs do it.

Or, there are libraries that will look after physics for you, such as ODE. Search the net for physics libraries in the programming language you are using.

Good luck, everyones gotta start somewhere.

(EDIT)

Oops, just re-read your post and maybe the above text is patronising.

If you have your velocity vector at hand, then it shows you know about physics to some degree.

What you will want to do is to set the upward component of the vector to the speed the car is moving upwards.

The upward vector is equal to the change in height since the last unit of time, minus the downward force of gravity.

The vehicle will leave the ground if the terrain drops away beneath the car, or if the upward vector exceeds the gravity.

When the car is touching the ground, you will need to apply some collision physics to the point of contact, which will basically bounce the car to a certain extent (a combination of elastic and inelastic collision equations). You can get fancy and make each tyre a seprate object and add suspension which will change the amount of force that actually makes it to the body of the car.

How complex do you want to make it?

How do you keep your vehicle on the ground? You are going about it the right way of you calculate an elastic/inelastic collision based on the vehicle's downward speed. If you do it by making the car's upward position equal to the height of the terrain, then you are making life hard for yourself, and your physics will be unrealistic.

Still, I recommend using a 3rd party physics library like ODE, because theres little point re-inventing the wheel.

[edited by - alexp on April 23, 2004 6:14:53 AM]

1. 1
2. 2
3. 3
Rutin
18
4. 4
JoeJ
14
5. 5

• 14
• 9
• 23
• 9
• 32
• ### Forum Statistics

• Total Topics
632623
• Total Posts
3007503
• ### Who's Online (See full list)

There are no registered users currently online

×