Skip to content

Vector2 Direction Switch

The Vector2 Direction Switch action sends events based on the dominant cardinal direction of a Vector2 variable.

Parameter Description
Vector2 The vector to check.
Left Event to send when the dominant direction is left.
Right Event to send when the dominant direction is right.
Up Event to send when the dominant direction is up.
Down Event to send when the dominant direction is down.
None Event to send when the vector has no direction (near zero).

Notes

  • The action compares absolute X and Y values and picks the dominant axis.
  • If the vector is near zero magnitude, the None event is sent.

Example

Use this action to branch movement input.

  1. Set Vector2 to your input vector.
  2. Map each direction event to a state or animation.
  3. Use None for idle logic.