- Home /
PS4 Left Analog Vertical Not Working (Input.GetAxis("Vertical"))
I'm trying to have the player use a PS4 controller to play. I'm having an issue with the left analog's input.
When I call Input.GetAxis("Vertical"), the value stays at zero when I move the analog stick up and down. However, Input.GetAxis("Horizontal") works completely fine. I've made sure the name is correct in the script and the input settings and tried different controller, and I'm not sure where to go from here.
I have a feeling it's something really dumb on my part. Any tips on how to solve this are greatly appreciated.
Here's my code:
void Update() { var x = Input.GetAxis("Horizontal"); var y = Input.GetAxis("Vertical");Debug.Log("Input.GetAxis(Vertical):" + Input.GetAxis("Vertical"));Movement(x, y, lookX); } public void Movement(float x, float y, float lookX){ // Movementif (canMove == true) { playerAnimations.SetFloat("VelX", x); playerAnimations.SetFloat("VelY", y); transform.position += (Vector3.forward * speed) * y * Time.deltaTime; transform.position += (Vector3.right * speed) * x * Time.deltaTime; transform.Rotate(0, Time.deltaTime * clockwise * lookX, 0); } }
Answer by abbasjin · Jan 02, 2020 at 12:25 PM
Update: I was able to get vertical axis input from my Dual Shock 4 by setting the "Vertical" input's "Axis" to "3rd Axis". --> https://i.imgur.com/51wTx4A.png
Old:
Were you able to resolve the issue with this? @emilibroooo
It doesn't seem to work for my on Vertical axis either; but works fine on Horizontal axis (left analog stick on dualshock 4 on windows 10).
With keyboard I can use in either axis without issues.
Your answer
Follow this Question
Related Questions
How do I use an Xbox controller axis other than the left thumbstick? 0 Answers
different behaviour of axis using xbox360 controller 1 Answer
Modify Verticle axis in the input manager 0 Answers
How to have vertical and horizontal axis work at the same time 1 Answer
Joystick input is being constrained to quadrant IV on its input axis 1 Answer