I recently made a car that the player can change the speed of. Whenever a player types in a speed, the car’s wheels will rotate at that speed. The problem is that the cylindrical constraints rotate in radians per second. Is there an equation or something I can use to get the correct velocity?
Graph:
X-axis = Input speed
Y-axis = Output speed
A radian is the angle covered by the radius of a circle being bent around it. A wheel rotating at 1 radian per second will move forward at a speed of (wheel.Size.Y / 2) studs per second, assuming it’s a Cylinder.
velocity (studs/sec) = rotvel (radians/sec) * (wheel.Size.Y / 2) (studs/radian)
Therefore:
rotvel (radians/sec) = velocity (studs/sec) / (wheel.Size.Y / 2) (studs/radian)
I haven’t tested this, of course, but I’m confident enough in my ~5th grade math.
2 Likes