Hi! I’m new to using code and I have a question regarding the camera settings within the “Introduction to Scripting in Unity” tutorial. I understand the purpose of each line but since the z axis is identified as “Vertical” how would one define the y axis which I would consider as vertical? Wouldn’t the z axis also be horizontal along with the x axis?
var speed = 5.0;
function Update () {
var x=Input.GetAxis(“Horizontal”)Time.deltaTimespeed;
var z=Input.GetAxis(“Vertical”)Time.deltaTimespeed;
transform.Translate(x, 0, z);
Would an additional line to add vertical movement to he camera look some thing like this. . .
var speed = 5.0;
function Update () {
var x=Input.GetAxis(“Horizontal”)Time.deltaTimespeed;
var y=Input.GetAxis(“What’s here???l”)Time.deltaTimespeed;
var z=Input.GetAxis(“Vertical”)Time.deltaTimespeed;
transform.Translate(x, y, z);
Thanks in advance- pal