Hey I need some help. I have managed to make the joystick and the buttons to working. But there is one problem, my walking animations won't work unless I have the directional inputs for the joystick. I know the input involves the x and y axis functions on the controller, but how do I put in the values? Here is the script piece: Code (CSharp): //Movement Animation if (Input.GetKey(KeyCode.W)) { animator.SetBool("Forward bool", true); } //else if (Input.GetKey()) //{ // animator.SetBool("Forward bool", true); //} else if (Input.GetKey(KeyCode.A)) { animator.SetBool("Forward bool", true); } else if (Input.GetKey(KeyCode.D)) { animator.SetBool("Forward bool", true); } else { animator.SetBool("Forward bool", false); } if (Input.GetKey(KeyCode.S)) { animator.SetBool("Forward bool", false); animator.SetBool("Backward bool", true); } else { animator.SetBool("Backward bool", false); } The commented pieces are the lines where if you tilt the stick left. Any help is appreciated.
Look into Input.GetAxis. If the value for 'Horizontal' is less than -0.5, move left, if it's greater than 0.5 move right. If it's between -0.5 and 0.5 don't do anything.