defold-scene3d icon indicating copy to clipboard operation
defold-scene3d copied to clipboard

Make code that uses `vmath.lerp` frametime-independent.

Open aglitchman opened this issue 3 years ago • 1 comments

Describe the bug Current, the code has lots of vmath.lerp calls. It assumes that the user has the constant 60 FPS.

To Reproduce Run the examples on higher or lower framerates.

Expected behavior The code should be deltatime-independent.

Additional context (optional) Using lerp with delta-time

aglitchman avatar Feb 16 '22 13:02 aglitchman

Use socket.gettime() differences between frames to calculate accurate dt.

subsoap avatar Feb 21 '22 01:02 subsoap