Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Fix min deltaSeconds
Browse files Browse the repository at this point in the history
  • Loading branch information
speigg committed Aug 10, 2022
1 parent ea498b3 commit a68312b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/engine/src/ecs/classes/World.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export class World {
const worldElapsedSeconds = (frameTime - this.startTime) / 1000
const engineState = getState(EngineState)
engineState.deltaSeconds.set(
Math.max(0, Math.min(TimerConfig.MAX_DELTA_SECONDS, worldElapsedSeconds - this.elapsedSeconds))
Math.max(0.001, Math.min(TimerConfig.MAX_DELTA_SECONDS, worldElapsedSeconds - this.elapsedSeconds))
)
engineState.elapsedSeconds.set(worldElapsedSeconds)

Expand Down

0 comments on commit a68312b

Please sign in to comment.