adding vertical movement to camera. . . .

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

GetAxis(“Vertical”) is simply using the name of the axis called “Vertical” as set up in the input manager. It could be called “Floopworpwackawacka” if you so desired. :wink: The Y axis as vertical is an arbitrary convention, but yes, that’s what’s vertical as default, at least as far as the default gravity settings are concerned. So your code is on the right track…set up something in the input manager for “What’s here???” (and probably call it something sensible instead of “Floopworpwackawacka” :slight_smile: ) and that should do it.

–Eric

I’ll give it a shot! Thanks for the help! - paul