Hello, as you know i´m new to programming, well not so new, i was programing with python before, but javascript is new for me at least. I wrote a script to make camera moves with keys W,A,S,D.
The camera tutorial ran well, and understood perfectly, but i looked that Vertical Axis of the camera is not the same to the Vertical´s objects ones. So if i want to move an object, the script does not work well, since the camera uses X and Z to move left, right, back, forward. The objects use X and Y, so with that script, the objects move left, right, up and down. Well, i fixed that by changing order, let say, for camera (X, 0, Z), for objects used (X, Y, 0). At the moment all is clear.
But there is something that i can´t understand well yet, when i set the script to move the camera with this script :
var speed = 5.0;
function Update () {
var x = Input.GetAxis("Horizontal") * Time.deltaTime * speed;
var z = Input.GetAxis("Vertical") * Time.deltaTime * speed;
transform.Translate(x, 0, z);}
Why we write a “Vertical” string if we are moving the camera along the left, right, forward, backward ?. There are no Up and Down movements…
Thank you!.
PD. If you have or link me a tutorial to understand this, you will help me too much…