diff --git a/Sources/Voxelotl/Game.swift b/Sources/Voxelotl/Game.swift index 2abbed8..3c8296c 100644 --- a/Sources/Voxelotl/Game.swift +++ b/Sources/Voxelotl/Game.swift @@ -42,11 +42,12 @@ class Game: GameDelegate { } func update(_ time: GameTime) { - let deltaTime = Float(time.delta.asFloat) fpsCalculator.frame(deltaTime: time.delta) { fps in print("FPS: \(fps)") } + let deltaTime = min(Float(time.delta.asFloat), 1.0 / 15) + player.update(deltaTime: deltaTime, boxes: boxes) camera.position = player.position camera.rotation =