From 428a13799b483146819f04a33369ed08407dd62e Mon Sep 17 00:00:00 2001 From: Benjythebee Date: Mon, 9 Dec 2024 08:48:08 +1300 Subject: [PATCH] fix lookat manager eye reset --- src/library/lookatManager.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/library/lookatManager.js b/src/library/lookatManager.js index 233d9891..ce5b2083 100644 --- a/src/library/lookatManager.js +++ b/src/library/lookatManager.js @@ -61,8 +61,18 @@ export class LookAtManager { // }, 1000/60); } setActive(active){ - console.log("is activating") this.userActivated = active; + if(!active){ + // reset rotation of eyes + this.bonesInfo.forEach(boneInfo => { + if(boneInfo.leftEyeBone){ + boneInfo.leftEyeBone.rotation.set(0,0,0) + } + if(boneInfo.rightEyeBone){ + boneInfo.rightEyeBone.rotation.set(0,0,0) + } + }) + } } setCamera(camera){ this.camera = camera