I’m watching a video on how to make a simple unity game, but I have been stuck for about an hour and would appreciate some help.
Error I am getting: Assets/BallControl.js(21,18): BCE0044: expecting (, found ‘OnCollisionStay’.`
#pragma strict
var RotationSpeed = 100;
var JumpHeight = 8;
private var IsFalling = false;
function Update (){
//Hand Ball Rotation
var Rotation : float = Input.GetAxis ("Horizontal") * RotationSpeed;
Rotation *= Time.deltaTime;
GetComponent.<Rigidbody>().AddRelativeTorque (Vector3.back * Rotation);
if (Input.GetKeyDown (KeyCode.W)) and (IsFalling == false){
GetComponent.<Rigidbody>().velocity.y = JumpHeight;
}
IsFalling = true;
//Check To See If Instance Is On Ground
function OnCollisionStay();
{
IsFalling = false;
}
}