so I found this code online, and its kind of what I was looking for because I needed a roll a ball player controller that worked, I was hoping someone could let me know what I need to add to make it so I can change the speed of the ball as a variable at will.
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
{
public 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, moveVertical);
rb.AddForce(movement);
}
}