Morning,
Hope you are doing well.
I closely followed the roll the ball tutorial, but still not successful.
I saw many different versions of this code. Some adding “speed” notion (which would be fine for to add), but I’d like to understand how it would work on the tutorial without this “speed” value.
Windows 10, Unity 5.4.0.f3
Thanks for your help
Hereunder is the code snippet
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);
}
}