Flip Skeleton towards walking direction

2D Mobile Game

Objective: Flip Skeleton to left when walking left and to right when walking right.

First of all create a reference to the Sprite renderer of the sprite where we can flip the player in x/y axis; in this case x-axis.

Then create a condition which check the target destination of the skeleton and flip according to the direction. Be sure to place it above the condition where you change the target to make sure that the player doesn’t flip before idle animation.

And this is the final result.

--

--

--

Unity Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

tmux configuration sample

Some Registration Required

Deploying and Configuring Spring Boot Apps in Kubernetes (with no YAML)

Advanced Marshmallow Usage — Updating data(Part 3)

Another Map, Filter, Reduce Article? Yes! Deep Dive — Part 1

What is HTML? With Complete Information!

What is HTML? How is HTML used? What is the tag of HTML? You will find answers to all these questions in this article.

Monitoring your server with Elastic Stack.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Niraj Karki

Niraj Karki

Unity Developer

More from Medium

Switch Statements To The Rescue!

How to Add Custom Post Processing Files to Individual Cameras in Cinemachine

2D Mobile: Setting Up The Player

Wrapping Up the Introductions