For the projectile Weaponscript in the FPS tutaorial I typed the following code which, as far as I can tell is correct but I keep getting this error: Assets/Weaponscripts/Projectile.js(5,38): BCE0005: Unknown identifier: 'collision'.
This is the script-
var explosion : GameObject;
function OnCollisionEnter( Collision : Collision ) { var contact : ContactPoint = collision.contacts[0];
var rotation = Quaternion.FromToRotation( Vector3.up, contact.normal );
var instantiatedExplosion : GameObject = Instantiate(
explosion, contact.point, rotation );
Destroy( gameObject );
}