Rotational Speed?
Blitz3D Forums/Blitz3D Programming/Rotational Speed?
| ||
So what I'm looking to do is have a ball roll on a plane at the right rotational speed. The diameter of the ball is 2 (radius=1). The circumference of the ball is Pi*diamter=6.28. Now say the ball is rolling in a straight line at a speed of 5. And you also want to keep the ball rolling in sync with the frame rate (which would be 0.018). To recap: Diameter = 2.0 Circumference = 6.28 Speed = 5.0 delta_time = 0.018 So it's gonna be a value * delta_time For some reason I can't get the ball rotating at the right speed to match it's linear speed. I can hack it but I'd rather get the formula right. |
| ||
Assuming 1 unit of speed = 1 units of diameter then I would have thought that the ball would need to roll about 79.62% of the way round, which would be about 286.632 degrees. So I guess it would be either: 286.632 * delta or speed*57.3264*delta |
| ||
(57.3264 / diameter) * delta The above equation works spot on. Thanks Nexic. |