---
title: How to Rig your Model for Animations
hide_meta: true
---

<Callout variant="info">
    Credit to [Blockbench wiki](https://www.blockbench.net/wiki/guides/blockbench-overview-tips) for the info and images.
</Callout>
<br></br>

# Video Guide

Here is a great video for how to rig your models from MoreByKev

<VideoEmbed id="d79OSoeKJx0"/>

<br></br>

# Parenting in Bone Structures
   Parenting is the process of connecting bones in a way that creates a hierarchy. In this structure:
   - **Child bones** can move independently,
   - **But** they will also follow the movement of their **parent bones**.

   This is essential for **posing and animation**, as it ensures natural and intuitive movements. For example, if the torso moves, the arms should move with it.

## How to Set Up Parenting:
   1. Always start from the **center of the body** and work outward (e.g., from the torso to the arms and legs).
   2. Create a logical structure where **closer (proximal) bones** are parents to the **farther (distal) bones**.

## Why Parenting Matters:
   In addition to parenting:
   - **Correct pivot points** (the rotation points for each bone) are crucial for smooth animation.
   - **Posing and animating** typically work the same way – outward from the body’s center.

<Callout variant="info">
    Tip for Clean Workflow:
       - Use a consistent naming system for bones to make the process easier to manage and understand.
</Callout>

<ModAsset
  width="30%"
  title="Modrinth Download"
  location="azurelib:bones"
/>

# Pivot Points

## Understanding Pivot Points

A pivot point is the **center of rotation** for a bone. When setting up a bone structure, placing the pivot point correctly is essential for smooth animation and future adjustments to the model.
### Where to Place the Pivot Point:
- **Avoid random placement** (as shown in the left-most example of the image) – this can cause issues during animation or model edits.
- **Don’t place it in the center of the geometry** (middle example). While it may seem logical, it often doesn’t lead to realistic or intuitive movement.
- The best place for a pivot point is **at the center of the joint** – the point where two bones connect (right-most example).

### Why Pivot Points Matter:
Correct pivot placement ensures:
- Natural and smooth movement for animations.
- Easier editing and adjustments later in the process.

<ModAsset
  width="70%"
  title="Modrinth Download"
  location="azurelib:pivots"
/>

The pivot point can be set in the viewport using the Pivot Tool (found in the Main Toolbar) or in the sidebar using sliders (found in the Element panel). The pivot point can also be centered to the selection using the button next to the Pivot Point sliders.

<ModAsset
  width="30%"
  title="Modrinth Download"
  location="azurelib:pivotsmenu"
/>

# Locators

Locators are named points you can add to a bone. They have no geometry; they just mark a spot that moves with the bone, such as the tip of a gun barrel, the palm of a hand or a mount point.

AzureLib keeps locators with their bone, so you can use them from code as [bone sockets](../misc/bone_sockets#blockbench-locators): find where they are in the world to spawn projectiles or particles, or render items and blocks there with the attachment layer.

### Tips for Locators:
- Put the locator **inside the bone it should follow**, so it moves with that bone's animation.
- Give each locator a **unique, descriptive name** (`muzzle`, `right_hand_grip`), since code refers to it by name.
- If something attached at the locator should point a certain way, rotate the locator; its rotation is used too.

To add a locator, select the bone it should belong to, then use the add menu (the `+` above the Outliner) and choose `Locator`. Move it into place with the move tool.

<ModAsset width="40%" title="Adding a locator" location="azurelib:add_locator"/>

Once your locators are in place, turn them into sockets with the **AzureLib Rig** panel, where you can check which way they face and generate their code. See [Sockets](./rig_panel#sockets).

# Next Steps

With bones, pivots and locators set up, you can add AzureLib's rig features on top: hitboxes, sockets, IK for feet and hands, look-at, joint limits, spring bones for tails, and blend spaces. See [Setting Up Rig Features](./rig_panel).
