bone-attachment

Attach meshes to bones of a skinned mesh, such as attaching a sword to a character's hand.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "bone-attachment" with this command: npx skills add verekia/r3f-gamedev/verekia-r3f-gamedev-bone-attachment

Bone Attachment

Attach meshes to bones of a skinned mesh, such as attaching a sword to a character's hand.

Technique

Create a BoneChild component that uses useEffect to add a container group to a bone and remove it on cleanup. The bone reference is obtained from the GLTF nodes after loading the model.

Key Concepts

  • Access bones from GLTF nodes (e.g., nodes.HandR)
  • Use bone.add(container) to parent objects to bones
  • Clean up with bone.remove(container) in useEffect cleanup
  • Apply position/rotation/scale offsets to adjust attachment placement

Usage

const { nodes } = useGLTF('/character.glb')

<BoneChild bone={nodes.HandR} position={[0, 0.3, 2]} rotation={[0, 0, 0]}>
  <mesh>
    <boxGeometry />
    <meshBasicMaterial color="red" />
  </mesh>
</BoneChild>

This skill is part of verekia's r3f-gamedev.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

smooth-interpolation

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ui-useframe

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

reactive-polling

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

r3f-setup

No summary provided by upstream source.

Repository SourceNeeds Review
bone-attachment | V50.AI