From 16d027b0e63aed3c3600944c684ff4494884627e Mon Sep 17 00:00:00 2001 From: goynov Date: Wed, 15 Apr 2026 21:36:18 +0300 Subject: [PATCH] increase idle timeout, ignore long frame timespans --- src/lib/Hero.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Hero.js b/src/lib/Hero.js index aedd39b..bad0472 100644 --- a/src/lib/Hero.js +++ b/src/lib/Hero.js @@ -129,7 +129,7 @@ class Hero{ } 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) if (this.engine.renderer.xr.isPresenting && !this.fpv){ this.cameraMode = 'fixed' @@ -200,7 +200,7 @@ class Hero{ 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); if (this.animationsMap[`idle.${idx}`]) { play = `idle.${idx}`