Download

Angular velocity radians to distance travelled producing weird results when game fps slows down.

I have been trying everything for sometime now and driving myself crazy!

Goal: I have a vehicle built which has 4 wheels. Take wheels -> get angular velocity in radians -> convert to distance traveled. This works semi-well until I introduce any large function (required for my purpose) that slows down the game FPS. Then all bets are off as to position, it just depends on how bad things slowed down.

I am just using a very basic calculation of (velocityOfRightWheel + velocityOfLeftWheel)dt/2
Where wheel velocity = angularVelocity
radiusOfWheel

See 1.jpg
What clock is radians/sec derived from? If I use event tick to drive this block and feed it delta time, same error. If I create dt from game clock to calculate the difference in time since the last time the event fired I still get a very similar result just scaled slightly.

Trying to get high FPS is not my main goal, to me it’s ok to run slow I just want my distance traveled to make sense and not scale with FPS but rather be as close to actual distance traveled as possible.

Any insight or thoughts are much appreciated! Thanks in advance.