I have been posting this question for awhile and havnt gotten an answer. My sphere keeps falling through the floor. It is suposed to be the character. I just want it to move i have a cube as a platform and it has a box collider. My sphere which is the character has the character controller a sphere collider and the script which is
var speed = 3.0;
var rotateSpeed = 3.0;
function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);
// Rotate around y - axis
transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);
// Move forward / backward
var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis ("Vertical");
controller.SimpleMove(forward * curSpeed);
}
@script RequireComponent(CharacterController)
If anyone sees anything wrong with the script or anything wrong with my components on the objects please tell me