Reverse Character Movement- Game Dev Series 130

Objective: create a backward walking animation.

When creating 3D character with movement animation, there is an easy way to create a reverse animation and apply it as a reverse movement, and this is what we are going to create in this article.

Walking animation

When we imported a walking animation to our character, we usually gives them one way animation.

To make a reverse animation, let’s open the Animator of character, and drag in another origin walking animation as a new one.

Rename it in Inspector, and set the speed to -1.

While playing this animation, you should see the character is walking backward.

Apply codes to it

Now we need to make this animation can be played when character is walking backward.
Create a float and a bool parameter.

The Speed parameter would be used to determine the walking direction of character, and the IsWalking bool would be used to detect is character standing still.
Assign them to both walking animation.
Make the walking animation played when character is walking and speed is greater than 0, then assign it to reverse walking animation when the speed is less than 0.

Now we can open the script and set the vertical input as moving speed to Animator.

And also assign the bool as true when either horizontal input nor vertical input are not 0.

All done! You can play and moving the character, and you should see a smooth walking animation.




A passionate gamer whose goal is to work in video game development.

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

Recommended from Medium

The two scales of DevOps

Trueface Achieves Top 3 Global Rank on NIST FRVT for Speed

some cool R packages for viewing and editing of df

KYVE Test Network: what’s new

Illustration by Dora Godfrey for Forge

Simple Solutions to Problems of a Front-end Web Developer

Enterprise Cloud & CIOs: Does Your Cloud First Adoption Strategy Making Your Enterprise IT Fragile?

6 Niche search engines you can explore

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
S.J. Jason Liu

S.J. Jason Liu

A passionate gamer whose goal is to work in video game development.

More from Medium

Camera plugin for Unity

Where’d He Goooooo…

How to Make the Camera Shake Using Impulse Listener Extensions in Cinemachines Virtual Cameras

Light her up — Adding emissions to your game objects using photoshop and blender