Hello, I am going through a tutorial on the player control and
I am lost on what I have done wrong.
Tutorial
http://cgcookie.com/unity/lessons/3-scripting-the-player-controller/
Thanks in Advance!
#pragma strict
var bottomThruster : ParticleEmitter;
var topThruster : ParticleEmitter;
var leftThruster : ParticleEmitter;
var rightThruster : ParticleEmitter;
function Start(){
}
function Update()
{
if(Input.GetAxis("Horizontal") > 0) //Checking for right arrow key {
{
Rigidbody.AddForce (10,0,0);
}
if(Input.GetAxis("Horizontal") < 0) //Checking for left arrow key
{
Rigidbody.AddForce (-10,0,0);
}
if(Input.GetAxis("Horizontal") == 0) //Checking if no horizontal key down
{
}
if(Input.GetAxis("Vertical") >0) //Checking for up arrow key
{
Rigidbody.AddForce (0,10,0);
}
if(Input.GetAxis("Vertical") <0) //Checking for down arrow key
{
Rigidbody.AddForce (0,-10,0);
{
}
if(Input.GetAxis("Vertical") == 0) //Checking if no vertical key down
}
}