I have been following a tutorial using the unity 3d engine and came to the part where you use the script to make your model controllable? I'm new to unity so i'm not exactly sure how to explain it. When i run the script my sphere (which is my temporary player) just falls through the floor, as if It has no colliders.
here's the script, maybe I'm missing something?
var speed = 3.0;
var rotateSpeed = 3.0;
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);
}
@script RequireComponent(CharacterController)
How do you add a collider to the Ground?