Hello, I’m currently making a game where the player must avoid incoming projectiles, and during this development I’ve encounter a slight problem were I’m not sure on how to make the first person controller move either upwards and downwards (by default it moves forward and backwards).
Therefore I began searching through the first person controller script and encountered a particularly interesting function:
function Update () {
// Get the input vector from kayboard or analog stick
var directionVector = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
I understand that this maps X and Z directions of the vector and puts 0 in Y. I was wondering if there was anyway way I could I swap the Y and Z to make it go up and down instead?
Thanks!