Sign in with
Sign up | Sign in
Your question
Solved

need help coding

Tags:
  • Speed
  • Java
  • Apps
Last response: in Apps General Discussion
Share
August 13, 2014 3:46:31 PM

i need help with a peice of code hats been driving me insane its java script to get a vehicle to move in unity3d

var Speed = 10;
var Reverse = 2;
var Turning = 15;

function Update ()
{
rigidbody.AddRelativeForce{Vector3.forward*Input.GetAxis{*Vertical*} * Speed};
transform.rotate{Vector3.up * Turning * Input.Getaxis{*horizontal*};
}

More about : coding

Best solution

August 14, 2014 2:28:06 AM

You've got braces where you should have parentheses, and you haven't even closed all of the opened pairs of braces. You need to learn the basics of JS syntax before trying to use Unity.
Share
August 14, 2014 12:33:22 PM

randomizer said:
You've got braces where you should have parentheses, and you haven't even closed all of the opened pairs of braces. You need to learn the basics of JS syntax before trying to use Unity.


ah right thank you , im actually doing these little youtube tutorials to learn unity and scripting.
this code is from one of the videos and i cant tell the difference between [ { ( on the video

thanks for the help bro :) 

m
0
l
August 14, 2014 3:07:30 PM

iamkyleme said:
randomizer said:
You've got braces where you should have parentheses, and you haven't even closed all of the opened pairs of braces. You need to learn the basics of JS syntax before trying to use Unity.


ah right thank you , im actually doing these little youtube tutorials to learn unity and scripting.
this code is from one of the videos and i cant tell the difference between [ { ( on the video

thanks for the help bro :) 



Youtube videos are the worst possible place to learn anything about software design.
m
0
l
!