Hi. I’ve run into an issue I have not been able to debug myself. This is from the Argon Assault rail shooter course. I am using Unity 2022.3.
Here is the relevant code:
void Update()
{
float horizontalThrow = Input.GetAxis("Horizontal");
Debug.Log(horizontalThrow);
float verticalThrow = Input.GetAxis("Vertical");
Debug.Log(verticalThrow);
}
During play, vertical axis input (with WASD/arrow keys or gamepad) returns values of 1 to -1 in the console. Horizontal axis input does not respond to input and returns 0. The script is attached to PlayerShip, the new input system is not installed, the Project Settings/Player/Configuration tab is set to Input Manager (old), URP/HDRP is not set up.
I have tried: opening an entirely new project and pasting the script onto a plain cube (gives exactly the same result), going through the Input Manager to make sure that every horizontal/vertical axis was set up correctly, and… copying and pasting the course code from the GitHub. I must have missed something obvious somewhere but I’m out of ideas.
I kept going in the hope that it was just reading out wrong somehow but immediately ran into other problems related to movement that I assume are connected. I was wondering if anyone had any ideas.