indiesoftby / defold-scene3d

Scene3D is a collection of scripts, materials and tools to help you develop 3D games with the Defold game engine.
https://indiesoftby.github.io/defold-scene3d/
MIT License
132 stars 8 forks source link

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

Open aglitchman opened 2 years ago

aglitchman commented 2 years ago

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

subsoap commented 2 years ago

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