How To Improve my Rigid Body Sphere Character Controller

Hello All,
I’m currently working on making a simple game that uses the a sphere with a rigid body as the character. I use a rigid body sphere because I want to make some mini-games using Unity’s Physics. Unfortunately I can’t seem to find any built in one so I wrote my own.

Here are my problems:

  1. The controls are unresponsive, it takes a while for your character to change velocity to a different direction.
  2. I haven’t been able to find a way to cap the max speed.
  3. Once again, controls are VERY Unresponsive. Any Ideas?

Here is my current code.
// Include Unity Assets
using UnityEngine;
using System.Collections;

// Declare our class 
public class launchRampTrigger : MonoBehaviour
{
    // Imnspector Variables
    public GameObject player;
    public float moveSpeed;
	
    // Use this for initialization
    void Start()
    {
    }

    // Update is called once per frame
    void FixedUpdate()
    {
        // Store our axis numbers for movement
        float horizontalAxis = Input.GetAxis("Horizontal");
        float verticalAxis = Input.GetAxis("Vertical");

        ////////////////////////////
        // Move Player
		rigidbody.AddForce (Vector3.forward * moveSpeed *  Time.deltaTime * horizontalAxis);
		rigidbody.AddForce (Vector3.right * -moveSpeed *  Time.deltaTime * verticalAxis);
		
    }
}

And sorry the file has a weird name, I forgot to change it’s name ha…

I have a couple of suggestion:
1)use something like this:
public class NewBehaviourScript : MonoBehaviour {

	public GameObject player;
	public float speed = 20;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	if(Input.GetKey(KeyCode.UpArrow)){
			player.transform.position = transform.forward * speed * Time.deltaTime;
	}
}
}

//use the same technique for the rest of the directions. change the value of "speed" to change the speed

2)add the first person controller component to the sphere. then change the camera, speed, etc in the inspector view

Hope it helps

Object turn faster:

  • Increase the drag (0 by default) in the Rigidbody, and increase the force applied each frame. Increasing the drag will cause the existing velocity to decay faster and the new velocity to be more “meaningful.”
  • You can “turn” the velocity instead of adding force. The object will then turn instantly.

To restrict speed:

  • You can scale the force applied each frame so that at higher speeds, no force is applied.
  • You can limit the velocity directly:

  if (rigidbody.velocity.magnitude > some_value)
        rigidbody.velocity = rigodbody.velocity.normalized * some_value;