I have more than an imput problem now :(

I have an error that says, "ArgumentException: Input Axis vertical is not setup.’

I’m new please help

I used the third person tutorial:

[/code]

My code is:

using JetBrains.Annotations;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class tpm : MonoBehaviour
{
public CharacterController controller;

public float speed = 6f;

// Update is called once per frame
void Update()
{
float horizontal = Input.GetAxisRaw("Horizontal");
float vertical = Input.GetAxisRaw("Vertical");
Vector3 direction = new Vector3(horizontal, 0f, vertical).normalized;

if(direction.magnitude >= 0.1f)
{
controller.Move(direction * speed * Time.deltaTime);
}

}
}

In programming it is critical to get the spelling, capitalization and punctuation 100% perfect.

Take a look in the InputManager settings and verify that the capitalization on name of the input axes matches what you are using above PRECISELY, specifically for the one that the engine is complaining about.

1 Like

you need to “vertical” to the Input Manager or you change it to “Vertical”, then it should work with the default setup

You have gone and deleted your post, AFTER getting the full benefit of an earlier post that had your answer. Why on earth would you do that? You have now prevented the next person who has your problem from learning anything!

Do NOT delete your posts, even after you figure it out. You completely defeat the purpose of the forum, WHICH YOU JUST USED TO SOLVE YOUR PROBLEM BY LOOKING AT AN OLD POST!!!

2 Likes

I have a new problem where my character doesn’t actually move, empty thing does. How do I fix that

Good lord you are a real piece of work!

How to report problems productively in the Unity3D forums:

http://plbm.com/?p=220

When you post code, use code tags: https://discussions.unity.com/t/481379

1 Like

@AshGaming08 … now seriously,

we try to help you, so maybe help us to help you…

@Kurt-Dekker posted “how to report problems”,

posting a stack trace not even nicely wont help us to help you :slight_smile:

I’m going back into the tutorial and fixing it, sorry for that, but I just don’t know any terms yet.

there is an error that says, “The variable controller of tpm has not been assigned.” tpm being the script name. I have character controller on thirdpersonplayer, my model, but I don’t know how to incorporate it in the script. I was trying to make my model go to the direction it was moving, but when I put the code in, the moving just stopped.

using JetBrains.Annotations;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class tpm : MonoBehaviour
{
    public CharacterController controller;

    public float speed = 6f;

    // Update is called once per frame
    void Update()
    {
        float horizontal = Input.GetAxisRaw("Horizontal");
        float vertical = Input.GetAxisRaw("Vertical");
        Vector3 direction = new Vector3(horizontal, 0f, vertical).normalized;

        if(direction.magnitude >= 0.1f)
        {
            float targetAngle = Mathf.Atan2(direction.x, direction.z) * Mathf.Rad2Deg;
            transform.rotation = Quaternion.Euler(0f, targetAngle, 0f);

            controller.Move(direction * speed * Time.deltaTime);
        }

    }
}

You already checked if the name is different in the editor?