Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Better car physics

Author
Message
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 16th Dec 2005 04:06 Edited at: 16th Dec 2005 04:07
I made a thread rescently about physics, but none of it was very accurate, so here's something better I made, this time using real equations.

They are all listed in the code, but I will post them here anyway.




And here's the code:

Note: It may look pretty boring, but it is very realistic.




A little lesson:

You will notice the program has some text, this is what it all means (for those who dont know):

The velocity as we all know is the speed of the car.
The acceleration is how much the cars velocity increases by, this would eventually get to infinite, but it doesn't because of the traction (which must be set to <1)
The work done is how much work the car has to do to move. e.g. The car does alot of work moving the car, but if it stops and does no work, the car will keep moving, but only whil descelerating.
The kinetic energy is the energy the car has at it's speed.


You can change the settings at the configuration part of the program to affect the car. You can change the: Speed, turn, traction, mass. The gravity is made by the program but you can change it is you want. The weight of the vehicle is calculated for you.


[edit]

I got some great help from this site here: http://home.planet.nl/~monstrous/tutcar.html

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 16th Dec 2005 14:01
Can we expect a slip tutorial?
I mean I really could use one

Immunity and Annihalation makes Immunihalation...
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 16th Dec 2005 14:11
I'm trying to find slip equations etc from the internet, I don't want it to be anything less than realistic.

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Dec 2005 23:27 Edited at: 17th Dec 2005 23:28
Betterificated.

I'm still working on slipping, though it's kinda hard doing it properly...




[edit]

If you want to help, check out this thread, and try to explain these symbols for me please

Login to post a reply

Server time is: 2024-11-23 07:20:53
Your offset time is: 2024-11-23 07:20:53