# Is Within

**Within Shape** - connect a shape to be used as the boundary for other shapes to fall within.

{% hint style="info" %}
Example usage:

1. Create 2 [Polygons](https://scenegroup.gitbook.io/cavalry/nodes/shapes/basic-shape).
2. Name them **Poly** and **Zone**.
3. Create an **Is Within** Behaviour.
4. Connect ***zone.id > isWithin.withinShape***.
5. Create a [Color Array](https://scenegroup.gitbook.io/cavalry/nodes/utilities/color-array).
6. Add a second index to the array and set a color.
7. Connect ***isWithin.id > colorArray.index***.
8. Connect ***colorArray.id > poly.fillColor***.

As you move **Poly** around, when its pivot is within the **Zone** Shape its color will change to the second index of your Color Array.
{% endhint %}
