So I have started doing the Roll a ball tutorial and have gotten up to the second part,moving the player. However I cannot seem to get the ball moving despite my code being exactly the same as in the video and everything in Unity correct
Here is my code for it:
1.using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
5.{
void FixedUpate ()
{
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
10.
Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
rigidbody.AddForce(movement);
}
15.}
If anyone could help me out that would be great
↧