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(