I just got unity and iv been trying to make a sphere move around on a platform but i have 1 problem. The sphere just falls through. This is a problem because I dont know if my scrpt is working. I have a sphere collider on my sphere and a box collider on my platform. If anyone has input please help me!
you need to add Rigidbody Component also.
http://unity3d.com/support/documentation/Components/class-Rigidbody.html
I added a rigidbody and it is still falling through the floor, I have a mesh renderer a sphere collider a rigidbody a character controller and a script on the character controller! help please
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)