Skip to main content

Is Within

Intro

Switch properties based on whether a Shape's position falls within another. Is Within will output a value of 0 when a Shape is outside the Within Shape and 1 when it is inside.

UI

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

Lines

Lines containing 2 points can be used as the Within Shape. The left side of the line is considered the inside — imagine walking along the line in its path direction and looking left. Path direction can be viewed in the Viewport by selecting a Shape with the Edit Shape tool.

If using a Basic Line then remember to reduce Divisions to 0.

Invert - Switch the result so that 0 is output when a Shape is inside the Within Shape and 1 when it's outside.

Example
  1. Create 2 Polygons.
  2. Name them Poly and Zone.
  3. Create an Is Within Behaviour.
  4. Connect zone.idisWithin.withinShape.
  5. Create a Color Array.
  6. Add a second index to the array and set a color.
  7. Connect isWithin.idcolorArray.index.
  8. Connect colorArray.idpoly.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.