Im making a top down 2d shooter, and I got 4 animations, an up animation, a down animation a left animation and a right animation, now I have this movement script:
[script]
using UnityEngine;
using System.Collections;
Call your animations with myAnimation AnimationClip; and then you could probably just check for WASD keypresses, and play the appropriate animation. Make sure that the animation stops on another keypress and that it loops if the key is held down.
Oh, and the abs() was something like Mathf.Abs() used for just seeing if horizontal or vertical movement is stronger Just don’t remember everything from memory.