How do you control a game object on screen with touch? Right now my object just jumps into the air right when the game starts:
var Player : GameObject;
function Update () {
if (Input.GetButtonDown) {
// Construct a ray from the current mouse coordinates
var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
if (Physics.Raycast (ray)) {
rigidbody.velocity.y = 5;
}
}
}