Character Controller script won't work?
I've been having this problem for a really long time now. I used a tutorial to write this script, and they have no problem with it, but I keep getting the error "input axis verticle is not setup." I've looked over mine and the creator's script many times. What do I do to get rid of this? This is the script: (Unfinished. It's a character controller melee combat script, I'm about 10% done with it, but apparently it's enough to work like a simple character controller) using System.Collections; using System.Collections.Generic; using UnityEngine;
public class CharacterController : MonoBehaviour { static Animator anim; public float speed = 10.0F;
// Use this for initialization
void Start () {
anim = GetComponent<Animator>();
Cursor.lockState = CursorLockMode.Locked;
}
// Update is called once per frame
void Update () {
float translation = Input.GetAxis("Verticle") * speed;
float straffe = Input.GetAxis("Horizontal") * speed;
translation *= Time.deltaTime;
straffe *= Time.deltaTime;
transform.Translate(straffe, 0, translation);
if (Input.GetButton("Fire1"))
{
anim.SetBool("IsAttacking", true);
}
else
anim.SetBool("IsAttacking", false);
if(translation != 0)
{
anim.SetBool("isWalking", true);
anim.SetBool("isIdle", false);
}
else
{
anim.SetBool("isWalking", false);
anim.SetBool("isIdle", true);
}
if (Input.GetKeyDown("escape"))
Cursor.lockState = CursorLockMode.None;
}
}
Answer by Reygus · Feb 23, 2017 at 02:00 PM
I believe it's Vertical and not Verticle Hope this helps
Your answer
Follow this Question
Related Questions
Setup an animation script, but now mouselook is not working? 0 Answers
Error "Input Axis Vertical is not set up" 2 Answers
having CharacterController movement in fixedupdate causes jerky movement on camera 3 Answers
Cap rigidbody movement speed based on input. 1 Answer
Quaternion.LookAt() without restricting manual rotation 2 Answers