- Home /
Question by
ProGamer2002 · Aug 20, 2017 at 10:47 AM ·
error-message
SO ,many errors!!!!
HII,Iam new to Unity plz help me,I wrote a Script for moving my car but,it is showing so many errors.Plz help me and if possible give me a new script for controlling the car and help it move.Here is my script:-- and some errors in my script:--
untitled.png
(155.5 kB)
untitled6.jpg
(251.5 kB)
Comment
Best Answer
Answer by SergeiKu · Aug 20, 2017 at 11:14 AM
Try this
if (Input.GetKey (KeyCode.UpArrow))
transform.Translate (new Vector3 (0, 0, 1));
else if (Input.GetKey (KeyCode.DownArrow))
transform.Translate (new Vector3 (0, 0, -1));
else if (Input.GetKey (KeyCode.RightArrow))
transform.Rotate ( new Vector3(0,1,0));
else if (Input.GetKey(KeyCode.LeftArrow))
transform.Rotate( new Vector3(0,-1,0));
Your answer
Follow this Question
Related Questions
Substute for Array.length? 2 Answers
Unity player error 1 Answer
Why am I getting this BCE0019 error? ScreenToWorldPoint' is not a member of 'System.Type 1 Answer
how to solve -- Object reference not set to an instance of an object -- ? 3 Answers
error CS0246: The type or namespace name `MultipartStreamProvider' 0 Answers