This is my script:
using UnityEngine;
using System.Collections;
public class DemoControlScript : MonoBehaviour {
private Animator myAnimator;
void Start () {
myAnimator = GetComponent<Animator>();
}
void Update () {
myAnimator.SetFloat ("VSpeed", Input.GetAxis ("Vertical"));
}
}
if(Input.GetKey("q")){
if((Input.GetAxis ("Vertical") == Of) && (Input.GetAxis ("Horizontal") == 0)){
myAnimator.SetBool ("TurningLeft", true);
}
} else {
myAnimator.SetBool ("TurningLeft", false);
}
if(Input.GetKey("e")){
if(Input.GetAxis ("Vertical" == Of) && (Input.GetAxis ("Horizontal") == 0)){
myAnimator.SetBool ("TurningRight", true);
}
} else {
myAnimator.SetBool ("TurningRight", false);
}
I don’t know what to do. I’ve made sure I have }