Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by dragonspiral11 · Jul 16, 2013 at 01:46 PM · controllerplayer-settings

How do I fix the error in my Player Controller?

Here's the code I wrote for my character controller:

using UnityEngine;

using System.Collections;

public class FirstPersonController : MonoBehaviour {

 public float movementSpeed = 5.0f;
 
 // Use this for initialization
 void Start () {
 
 }
 
 // Update is called once per frame
 void Update () {
 
     float forwardSpeed = Input.GetAxis("Verical") * movementSpeed;
     float sideSpeed = Input.GetAxis("Horizontal") * movementSpeed;
     
     Vector3 speed = new Vector3( sideSpeed, 0, forwardSpeed );
     
     CharacterController cc = GetComponent<CharacterController>();
     
     cc.SimpleMove( speed );
     
 }

}

And when I try to move my character I can't move and I get this error:

UnityException: Input Axis Vertical is not setup. To change the imput setting use: Edit -> Project Settings -> Input FirstPersonController.Update () (at Assets/Script/FirstPersonController.cs:16)

Can you help me fix my problem.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image amphoterik · Jul 16, 2013 at 01:45 PM 0
Share

Please fix your code so that it is formatted correctly.

avatar image Mason22 · Aug 21, 2016 at 01:01 PM 0
Share

Thank you , this was very helpful i appreciate it , I had the same problem

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by amphoterik · Jul 16, 2013 at 01:50 PM

You spelled vertical wrong. It is this:

 float forwardSpeed = Input.GetAxis("Verical") * movementSpeed;

It should be this:

 float forwardSpeed = Input.GetAxis("Vertical") * movementSpeed;
Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image InfiniBuzz · Jul 16, 2013 at 01:57 PM 0
Share

uh, you're faster :P

avatar image amphoterik · Jul 16, 2013 at 01:59 PM 0
Share

Heh, sorry. To be fair, I cheated. I am the one that published this from moderation so I knew it was co$$anonymous$$g :)

avatar image dragonspiral11 · Jul 16, 2013 at 02:07 PM 0
Share

Oh I see thanks!

avatar image amphoterik · Jul 16, 2013 at 02:41 PM 0
Share

If this answered your question, please select it as the answer. It helps future viewers and gives you karma as well.

avatar image
1

Answer by InfiniBuzz · Jul 16, 2013 at 01:51 PM

you have a typo in:

 float forwardSpeed = Input.GetAxis("Verical") * movementSpeed;

is this right in your original script? change "Verical" to "Vertical":

 float forwardSpeed = Input.GetAxis("Vertical") * movementSpeed;

it should be setup by default if not, do what the error tells you ;)

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image dragonspiral11 · Jul 16, 2013 at 02:07 PM 0
Share

Yeah, I misspelled. xD

avatar image InfiniBuzz · Jul 16, 2013 at 02:43 PM 1
Share

O$$anonymous$$ please tick @amphoterik's answer as correct (he was faster;) ). This will help ppl with the same problem and noone wastes time reading this if its already solved.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

MMD How to export model and animations to Unity as 3rd person controller? 2 Answers

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Torque forces or Quaternion transforms for hovercraft rotations? 2 Answers

Referencing an object from one script to another, script reference doesn't help :/ 0 Answers

Only activate scripts when game is toggled to the first person controller 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges