Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » I need information on how vechicle movement works
I need information on how vechicle movement works [message #88576] Wed, 19 May 2004 00:17 Go to previous messageGo to previous message
gibberish
Messages: 366
Registered: May 2003
Karma:
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)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: UnWrap Question
Next Topic: Now hiring.....
Goto Forum:
  


Current Time: Sat Dec 28 18:23:30 MST 2024

Total time taken to generate the page: 0.00687 seconds