Hello, I’m new to unity and I have started with the roll a ball tutorial.
I’m unable to make my ball roll unless I hard code the value for the axis. Via debugging I have confirmed that the values for the axis are coming as 0. The speed value I set as 100 is coming properly.
I am using unity 5.4.1 Personal and visual studio 2015.
Here is my code. Taken Directly from the tutorial
using UnityEngine;
using System.Collections;
public class PlayerControler : MonoBehaviour {
public float speed;
private Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody> ();
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical =Input.GetAxis("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rb.AddForce (movement* speed);
}
}
alt text
Here are the screen shots of the input manager. I’m having issues attaching more then one file. I wanted to also attach the inspector image. But if there is anything additional you need to assist me please let me know.