Question by
Reznor3000 · Feb 18, 2016 at 09:20 AM ·
sphere
Ball Not Rolling, tutorial
I have done everything the tutorial has told me to do, and wrote and rewrote the same script over and over but the ball will still not roll, I do not know what to do.
using UnityEngine; using System.Collections;
public class PlayerController : MonoBehaviour {
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);
}
}
Comment