why the ball doesnt move? Ive done everything the video showed and im in the end of the video "moving the player" where were supposed to try out if our ball moves but mine doesnt.
using UnityEngine; using System.Collections;
public class PlayerController : 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);
}
}
Comment
Your answer
Follow this Question
Related Questions
Why canvas is so big? 0 Answers
When I extract and run, the FirstPersonController wont let me look up and down 0 Answers
Unity 3D textbook / ebook 0 Answers
Value set in function doesn't update the glabal value 0 Answers
Tutorial problem 0 Answers