Hello. I just trying to animate my character with basic animation → walking,running and idle. My problem is that even if I hold my W key, walking animation is executed, after it idle animation is going and after it walking animation and so on. My problem is that I need to keep walking animation until I release W. How can I do it? I used animator with conditions: If Speed is greater then 0 and running is false, then animation should go from idle to walking and for script I have:
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour {
public Animator Anim;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Anim.SetFloat(“Speed”, Input.GetAxis (“Vertical”));
}
}
what I need to do to make walking animation to run until I release W button?
Thanks.