Ive been following the video for the “rollerball” game and everything has gone well until i come to test the game and the character doesnt respond to any input. I’ve tried different keys but nothing works. The script (that i copied from the video) is below. I’m not stuck as to why it doesnt respond as ive followed all directions.
using UnityEngine;
using System.Collections;
public class Playercontroller : MonoBehaviour
{
public float speed;
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rigidbody.AddForce (movement * speed * Time.deltaTime);
}
}