mirror of
https://github.com/GayPizzaSpecifications/voxelotl-engine.git
synced 2025-08-02 13:00:53 +00:00
prevent gameplay time delta getting too high
This commit is contained in:
parent
fdec42daa3
commit
761fb71af3
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user