Hi i was wandering if you guys could help me set up my characters animatior using blendtrees at the moment im just using bools to switch between animations but it is to clunky and looks bad, i just need help understanding what to do //this is the script that i am using to change between them using UnityEngine; using System.Collections; public class amiwalking : MonoBehaviour { Animator anim; PlayerMovement Variables; public GameObject Revolver; void Start () { GameObject Player = GameObject.Find("PlayerController(Clone)"); anim = GetComponentInChildren<Animator>(); } //Update is called once per frame void Update () { //////MOVEMENT if (Input.GetButtonDown ("Vertical")) { anim.SetBool ("Walking", true); } if (Input.GetButtonUp ("Vertical")) { anim.SetBool ("Walking", false); } if (Input.GetButtonDown ("Horizontal")) { anim.SetBool ("WalkingSide", true); } if (Input.GetButtonUp ("Horizontal")) { anim.SetBool ("WalkingSide", false); } if (Input.GetButtonDown ("Run")) { anim.SetBool ("Running", true); } if (Input.GetButtonUp ("Run")) { anim.SetBool ("Running", false); } if (Variables.grounded == false) { anim.SetBool ("Jumping", true); } if (Variables.grounded == true) { anim.SetBool ("Jumping", false); } if (Input.GetButtonDown ("Crouch")) { anim.SetBool ("Crouch", true); } if (Input.GetButtonUp ("Crouch")) { anim.SetBool ("Crouch", false); } /////MOVEMENT } }
code tags please, makes it easier to read the pasted code: http://forum.unity3d.com/threads/using-code-tags-properly.143875/