# Pathfinder

[Common Attributes](https://scenegroup.gitbook.io/cavalry/nodes/behaviours/common-attributes-behaviours) +

{% tabs %}
{% tab title="Behaviour" %}
**Travel** - move your Shape along a percentage of the **Input Shape**’s length.

**Loop** - when checked a shape will return to the beginning of the Path and continue animating. When unchecked a shape will continue in the direction of the first/ last point.

**Reverse Input Path** - reverse the direction of the Input Path.

**Input Shape** - connect a Shape to position/deform your Shape along.
{% endtab %}

{% tab title="Deformer" %}
**Taper Graph** - create a taper along the length of you Shape. (no support for strokes yet).

**Path Offset** - move the Shape away from the **Input Shape**.

**Flip** - flip the Shape along its x axis. This is particularly useful for Text.
{% endtab %}

{% tab title="Value" %}
**Rotation** \[read only] - outputs the rotation along the normal of the **Input Shape**. Connect this to the **Rotation** attribute of another Shape.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Example usage (Deformer):

1. Create a [Rectangle](https://scenegroup.gitbook.io/cavalry/nodes/shapes/basic-shape).
2. Add some **Edge Divisions** in **X**.
3. Click the `+` icon next to **Deformers** on the Rectangle and add a **Pathfinder**.
4. Draw a path with the [Pen tool](https://scenegroup.gitbook.io/cavalry/user-interface/menus/tool-menu/pen-tool).
5. Connect ***path.id > pathfinder.inputShape***
   {% endhint %}

{% hint style="info" %}
Example usage (animate along a path):

1. Create an [Ellipse](https://scenegroup.gitbook.io/cavalry/nodes/shapes/basic-shape).
2. Draw a path with the [Pen tool](https://scenegroup.gitbook.io/cavalry/user-interface/menus/tool-menu/pen-tool).
3. Create a **Pathfinder.**
4. Connect ***path.id > pathfinder.inputShape**.*
5. Connect ***pathfinder.id > ellipse.position**.*
   {% endhint %}

{% hint style="info" %}
Use the [Align](https://scenegroup.gitbook.io/cavalry/nodes/behaviours/align) behaviour to pin Shapes to their top/ bottom/ left/ right edges before adding a Pathfinder to deform shapes on the inside or outside of the **Input Path**.
{% endhint %}
