Skip to content

Sprite Flip Actions

Unity’s SpriteRenderer component includes properties to flip sprites on the X or Y axis.

PlayMaker provides helper actions that make it easy to flip sprites automatically to face movement or targets - a common need in 2D games.

Transform Flip Actions

If you need to flip the entire GameObject (including child objects such as colliders, attach points, or sensors), use Transform Flip Actions instead of flipping only the sprite.

Note: These actions assume the sprite graphic faces right by default.
If your sprite faces left, enable the Invert option.


Flip X to Face Direction

Flips a SpriteRenderer horizontally to face a Vector2 direction.

Typically used with a movement vector - for example, flipping the sprite to face the direction it’s moving.

Parameter Description
Sprite Renderer The component to flip.
Direction The Vector2 direction to face (for example, from Get Velocity 2D).
Invert Invert the flip logic if your sprite faces left by default.

Flip X to Face Float Direction

Flips a SpriteRenderer horizontally based on a float value.

Positive values face right; negative values face left.

Useful for input axes (e.g., Get Axis) or any animated float variable representing direction.

Parameter Description
Sprite Renderer The component to flip.
Float Direction Positive = right, Negative = left.
Invert Invert the flip logic if needed.

Flip X to Face Target

Flips a SpriteRenderer horizontally to face a target Transform.

Similar to Flip X to Face Direction, but the direction is calculated automatically from the target’s position relative to the sprite.

Parameter Description
Sprite Renderer The component to flip.
Target The Transform to face.
Invert Invert the flip logic if your sprite faces left by default.

Flip Y to Face Direction

Flips a SpriteRenderer vertically to face a Vector2 direction.

Useful for top-down or vertical-scrolling games where the sprite needs to face up or down.

Parameter Description
Sprite Renderer The component to flip.
Direction The Vector2 direction to face.
Invert Invert the flip logic if your sprite faces down by default.

Flip Y to Face Float Direction

Flips a SpriteRenderer vertically based on a float value.

Positive values face up; negative values face down.

Use this to mirror the sprite vertically according to vertical input or movement.

Parameter Description
Sprite Renderer The component to flip.
Float Direction Positive = up, Negative = down.
Invert Invert the flip logic if needed.

Flip Y to Face Target

Flips a SpriteRenderer vertically to face a target Transform.

Calculates whether the target is above or below the sprite and flips accordingly.

Parameter Description
Sprite Renderer The component to flip.
Target The Transform to face.
Invert Invert the flip logic if your sprite faces down by default.

💡 Example Usage

These actions are commonly combined with movement actions such as:

  • Get AxisFlip X to Face Float Direction
  • Get VelocityFlip X to Face Direction
  • Move TowardsFlip X to Face Target

Example Setup

  1. Add a SpriteRenderer component to your character.
  2. Add a Get Axis action to read Horizontal input.
  3. Add Flip X to Face Float Direction, using the Horizontal axis value.
  4. Add a Translate 2D action to move your sprite.

The sprite will automatically flip to face the direction of movement.