Since I'm relatively new to coding, this may seem like a trivial issue to you all. It says that on line 15 a semicolon is expected. I already have a semicolon so I think it's an issue with the rest of the code. Can someone help, please?
#pragma strict
var rotationSpeed = 75;
var jumpHeight = 10.5;
function Update ()
//first lines!
{var rotation : float = Input.GetAxis ("Horizontal")*rotationSpeed;
rotation *= Time.deltaTime;
GetComponent.().AddRelativeTorque (Vector3.forward*rotation);
if (Input.GetKeyDown(KeyCode.W)) IsFalling = false;
{
GetComponent.()velocity.y = jumpHeight;
IsFalling = true;
}
}
function OnCollisionEnter()
{
{IsFalling=false;
}
}
↧