From b43d71d5e0d9f7d7deaf1b1624e161a0539951f5 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Apr 2026 13:57:56 +0200 Subject: [PATCH] Update animation handling in runtime-host.ts --- src/runtime-three/runtime-host.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/runtime-three/runtime-host.ts b/src/runtime-three/runtime-host.ts index b8066f06..0a7fbc34 100644 --- a/src/runtime-three/runtime-host.ts +++ b/src/runtime-three/runtime-host.ts @@ -2778,6 +2778,22 @@ export class RuntimeHost { renderGroup.position.set(npc.position.x, npc.position.y, npc.position.z); renderGroup.rotation.set(0, (npc.yawDegrees * Math.PI) / 180, 0); } + + if ( + this.animationMixers.has(npc.entityId) && + (npc.animationClipName !== previousAnimationClipName || + npc.animationLoop !== previousAnimationLoop) + ) { + if (npc.animationClipName === null) { + this.applyStopAnimationAction(npc.entityId); + } else { + this.applyPlayAnimationAction( + npc.entityId, + npc.animationClipName, + npc.animationLoop + ); + } + } } const nextResolvedControl = applyRuntimeProjectScheduleToControlState(