fix
This commit is contained in:
parent
7bc0ba9e93
commit
72456a96f3
@ -36,6 +36,12 @@ const VRMModel: React.FC<ModelProps> = ({ url, url_anim, position, rotation, sca
|
||||
mixer.clipAction(clip).play();
|
||||
}
|
||||
});
|
||||
if (mixerRef.current) {
|
||||
const hips = vrmModel.humanoid?.getBoneNode('hips');
|
||||
if (hips) {
|
||||
hips.rotation.y = Math.PI;
|
||||
}
|
||||
}
|
||||
});
|
||||
}, [url, url_anim]);
|
||||
|
||||
@ -65,10 +71,10 @@ export const VRMModelCanvas = () => {
|
||||
}}
|
||||
camera={{ position: [1.2, 0, 0] }}>
|
||||
<color attach="background" args={["#000"]} /> {/* Light gray background */}
|
||||
<OrbitControls />
|
||||
<OrbitControls dampingFactor={0.05} rotateSpeed={0.1} zoomSpeed={0.5}/>
|
||||
<ambientLight intensity={10} />
|
||||
<pointLight position={[10, 10, 10]} />
|
||||
<VRMModel url="./models/t.vrm" url_anim="./models/default.vrma" position={[0, -0.6, 0]} rotation={[0, 0, 0]} scale={[1, 1, 1]} />
|
||||
<VRMModel url="./models/t.vrm" url_anim="./models/default.vrma" position={[0, -0.6, 0]} rotation={[0, 89.5, 0]} scale={[1, 1, 1]} />
|
||||
</Canvas>
|
||||
</div>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user