From 931a9198091a3caabd2ec4e115ca01deff4c1205 Mon Sep 17 00:00:00 2001 From: keshigomu Date: Fri, 2 Aug 2024 17:17:34 +0900 Subject: [PATCH] Fix humanoidAnimation example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 追加でアニメーションを読み込んだ際にポーズをリセットしていなかったため、ルートモーションの開始位置がずれていってしまっていた。 FBXのロード時にアバターのポーズをリセットする。 --- packages/three-vrm/examples/humanoidAnimation/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/three-vrm/examples/humanoidAnimation/main.js b/packages/three-vrm/examples/humanoidAnimation/main.js index 13b1a057f..1ed8ebd2a 100644 --- a/packages/three-vrm/examples/humanoidAnimation/main.js +++ b/packages/three-vrm/examples/humanoidAnimation/main.js @@ -110,6 +110,7 @@ function loadFBX( animationUrl ) { currentAnimationUrl = animationUrl; + currentVrm.humanoid.resetNormalizedPose(); // create AnimationMixer for VRM currentMixer = new THREE.AnimationMixer( currentVrm.scene );