I need information on how vechicle movement works [message #88480] |
Tue, 18 May 2004 18:45 |
|
i.e. all the wheel bones etc.
What I need is complete information such as "rotate the wheelp bone 20 degrees around the X axis every 30 seconds then rotate the wheelc bone 20 degrees around the Y axis every 5 seconds" or something.
i.e. all the info needed to take a renegade vechicle and make it move "realisticly" (in the renegade context) accross the screen at a certain speed. (whichever speed is easiest to animate will do)
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
I need information on how vechicle movement works [message #88576] |
Wed, 19 May 2004 00:17 |
|
gibberish
Messages: 366 Registered: May 2003
Karma: 0
|
Commander |
|
|
Dunno If this will help you much, but I might as well get the ball rolling:
If a vehicle is moving in a straight line we have:
Circumference = Pi * WheelRadius * 2
- The Distance a vehicle travels
Distance = Rotations * Circumference
- Also Distance is related to speed
Distance = Speed * Time
Note: Speed is in GameUnits per second.
- So putting this together we get:
Speed * Time = Rotations * Pi * WheelRadius * 2
- However time is determined by the interval between the frames.
Time = 1 / FPS
- So we now have
Speed / FPS = Rotations * Pi * WheelRadius * 2
- So re-arranging for rotations we get
Rotations = Speed / (FPS * Pi * WheelRadius * 2)
Now you can just multiple Rotations by 360 to get Degrees or 2 Pi for Radians.
Note: If you use Radians you can elimiate Pi from the calculation completely:
RadiansPerFrame = Speed / (FPS * WheelRadius)
|
|
|
|
|
|
|
|