Unity Animation System Part 2

Objective: Add a Walking Animation to the Player when they are Moving.

First I will open the Animator Window for Darren and drag in the Walking Animation from the Animations Folder. Then add the transitions from Idle to Walking and back.

Now I will add a parameter of type bool(True or False) and name it “Walk”. I will use this to trigger the Animation.

For the Transistion to walk I will add the Condition of Walk is True.

For the Transition to Idle I will add the Condition of Walk is False.

Now that I have the bool condition created and added to the transition, its time to set the bool condition using code. When the player is moving to the destination the bool is set to True and when the Player reaches their destination the bool is set to False.

Now lets see this code in action.

Happy Coding!!!!

--

--

--

Unity / C# Game developer

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

Recommended from Medium

Microservices Asynchronous Message-Based Communication

Weekly Digest 19/2022

Relational Database Modelling 101

Realtional DB systems

How I chose iOS Development as a Career. Also, F*ck College.

ROCK-PAPER-LINUX!

How to Tell What Platform a Website is Built On

To test or not to test

The cover of the book Street Coder.

10 Things I Wish I Knew as a Computer Science Freshman

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
Bill Rislov

Bill Rislov

Unity / C# Game developer

More from Medium

Level Design in Unity Part 2: The Walls

The new Input System: Create your first input asset

Quick tip — Upgrading your Unity project to High Definition Render Pipeline (HDRP)

What is Filebase and How do you use it?