I’m trying to create a speedometer for my car, however I’m stumped on how to figure out the rotation based on speed.
This is kinda what I got so far. MinAngle is the rotation of the needle at 0 speed. MaxAngle is the rotation of the needle at top speed (which is 200, MaxSpeed)
TotalArc is the sum of those 2 together. Not sure if that’s needed, but figured if I could do some sort of equation that’d get like speed / totalArc or something that I could then get the rotation figured out, but I’m not too sure
local MinAngle = -100
local MaxAngle = 100
local TotalArc = -MinAngle + MaxAngle
local MaxSpeed = 200
while true do
local Speed = math.floor((Car.Body.VehicleSeat.Velocity.magnitude * 1) + 0) / 1
local SpeedRatio = Speed / MaxSpeed
wait()
end