var jumpVelocity : float = 20;
@HideInInspector
var grounded : boolean = false;
function Update ()
{
if (Input.GetButtonDown("Jump"))
rigidbody.AddForce(0,jumpVelocity,0);
}
function OnCollisionStay (collision : Collision)
{
for (var contact : ContactPoint in collision.contacts)
{
if (Vector3.Angle(contact.normal, Vector3.up < maxSlope)
grounded = true;
}
}
errors
Assets/Jump.js(16,13): BCE0044: expecting ), found 'grounded'.
Assets/Jump.js(16,22): BCE0043: Unexpected token: =.
And yes i am a Beginner thanks