Day 87 — Implementing Animations: Running Animation

private Animator _anim;void Start()
{
_anim = GetComponentInChildren<Animator>();
}
void Update()
{
if (_controller.isGrounded == true)
{
float horizontalInput = Input.GetAxis("Horizontal");
_anim.SetFloat("Speed", Mathf.Abs(horizontalInput));
}
}

--

--

--

Hey and welcome! My name is Connor and my goal here is to put out a daily post for a full year about my game development journey.

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

Recommended from Medium

Microsoft Azure Application Services Marketplace Analyzed

How to scrape every craigslist gig in America using Python.

Docker Containers — Learn DevOps Concept like I’m five

Table Critique, my 3rd Rails app project!

Automate script to quickly build, test and run Android Studio

I wrote my first coding interview test.

Family Driver https://t.co/eSUCKwhjCm

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
Connor Fullarton

Connor Fullarton

Hey and welcome! My name is Connor and my goal here is to put out a daily post for a full year about my game development journey.

More from Medium

How To Use Post Processing In Unity

Creating a HUD (part 2)

A Simple Shop System for a Unity 2D Game — Part 2: UI Mechanics

Conditional CSS Class with Surface-UI