- Home /
z-axis movement
I was wondering, how do I get my ship to move forwards? I was thinking input.getkey(w), but then what?
http://docs.unity3d.com/Documentation/ScriptReference/Transform.Translate.html
http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody.AddForce.html
there's a search-bar at the upper-right side of this forum/board also...
http://search.unity3d.com/uss1/?q=ship%20control&type_of_search=answers≈p=All
Answer by Stormizin · Jul 04, 2013 at 06:24 PM
You can use as an example:
void Update(){
if(Input.getkey(Keycode.W)){
transform.Translate(Vector3.foward);
}
}
Any doubts give me a comment.
If this answer helped you, please mark the answer as a correct answer to keep the community organized.
Your answer

Follow this Question
Related Questions
All gameObjects with specific tag disable z axis as to not fall forward or backward? 2 Answers
move object along x and y axis without affecting its forward z axis 1 Answer
How to make a object follow another on only 2 axises? 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Vertical 3-way/lane movement? 0 Answers