How to make the object move down the Z axis instead of Y axis?

Hello. I’m overall new to making games so all help is appreciated. I am using this script to move my character simply. The only thing I’ve been trying to change is that instead of the object moving along the Y axis I want it to move along the Z axis. That is all :slight_smile:

using UnityEngine;
using System.Collections;

public class Move : MonoBehaviour {
	
	float speed = 3f;
	
	void Update() {
		var move = new Vector3(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"), 0);
		transform.position += move * speed * Time.deltaTime;
	}
}

You’re moving both X and Y axis right now. Assuming you want the Y axis to be 0, then:

var move = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));

Simple.