useSkeletalAnimation hook
Manages skeletal animation state and frame updates for player characters. Handles animation selection based on player state (idle, walk, attack, etc.) and applies keyframes to the skeletal rig.
Animation options
Animation state and update function
const { animState, animTimeRef, updateRigAnimation, diagonalRotationY } = useSkeletalAnimation({ currentAnimation: "walk", isBlocking: false, onAnimationComplete: () => console.log("Animation completed"), });// In useFrame callbackuseFrame((_, delta) => { updateRigAnimation(rig, delta);}); Copy
const { animState, animTimeRef, updateRigAnimation, diagonalRotationY } = useSkeletalAnimation({ currentAnimation: "walk", isBlocking: false, onAnimationComplete: () => console.log("Animation completed"), });// In useFrame callbackuseFrame((_, delta) => { updateRigAnimation(rig, delta);});
골격애니메이션훅
useSkeletalAnimation hook
Manages skeletal animation state and frame updates for player characters. Handles animation selection based on player state (idle, walk, attack, etc.) and applies keyframes to the skeletal rig.