Every time i run the code i get the error
PLEASE keep in mind i have been coding for 2 days.
"Assets/Ball_Control.js(26,49): BCE0043: Unexpected token: false."
#pragma strict
var rotationSpeed = 100;
var jumpHeight = 8;
private var isFalling = false;
function Update ()
{
//handle ball rotation.
var rotation : float=Input.GetAxis ("Horizontal")* rotationSpeed;
rotation *=Time.deltaTime;
rigidbody.AddRelativeTorque(Vector3.back * rotation);
//This is to tell the script that when you push the key "W" that the velocity of the y axis of the ball
// will go the jumpHeight
if (Input.GetKeyDown(KeyCode.W))
{
rigidbody.velocity.y = jumpHeight;
}
}
function onCollisionStay( isFalling : false)
{
}
↧