import { Group, Mesh, MeshStandardMaterial, BufferGeometry } from 'three'
import { useGLTF } from '@react-three/drei'

export default function Character() {
    // import glb file

    // load the glb file in "/models/BASEmodel.glb"
    const { nodes, materials, scene } = useGLTF('/models/man.glb')
    
    // rotate the character
    scene.rotation.x = -Math.PI / 2
    scene.rotation.y = 0

    // enfoncer le personnage dans le sol
    scene.position.y = -1

    return (
        <group>
            <primitive object={scene} />
            <directionalLight position={[0, 10, 0]} intensity={5} />
        </group>
    )

    
}