increase idle timeout, ignore long frame timespans

This commit is contained in:
2026-04-15 21:36:18 +03:00
parent 2f0d33d431
commit 16d027b0e6
+2 -2
View File
@@ -129,7 +129,7 @@ class Hero{
} }
update(delta){ update(delta){
if (this.ready && this.engine.physics.started && !this.disableInput) { if (this.ready && this.engine.physics.started && !this.disableInput && delta < 1) {
this.updateCharacterControls(delta) this.updateCharacterControls(delta)
if (this.engine.renderer.xr.isPresenting && !this.fpv){ if (this.engine.renderer.xr.isPresenting && !this.fpv){
this.cameraMode = 'fixed' this.cameraMode = 'fixed'
@@ -200,7 +200,7 @@ class Hero{
play = 'idle'; play = 'idle';
} }
if (this.currentAction.startsWith('idle') && play.startsWith('idle') && this.actionStart > 10){ if (this.currentAction.startsWith('idle') && play.startsWith('idle') && this.actionStart > 25){
let idx = 1 + parseInt(this.currentAction.split('.')[1] || 0); let idx = 1 + parseInt(this.currentAction.split('.')[1] || 0);
if (this.animationsMap[`idle.${idx}`]) { if (this.animationsMap[`idle.${idx}`]) {
play = `idle.${idx}` play = `idle.${idx}`