hey my current movement script is made to work with char controller, but the car cant rollover or anything, could someone please help me change it to work with rigid body
//moving around
var speed = 3.0;
var rotateSpeed = 3.0;
//shooting
var bulletPrefab:Transform;
function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);
transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);
var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis ("Vertical");
controller.SimpleMove(forward * curSpeed);
if(Input.GetButtonDown("Jump"))
{
var bullit = Instantiate(bulletPrefab, transform.Find("shootPoint").transform.position, Quaternion.identity);
bullit.tag = "Progectile";
bullit.rigidbody.AddForce(transform.forward * 3000);
}
}