Question by
SeudoNimm · Oct 06, 2019 at 01:54 PM ·
controllerinput manageraxes
Unity not picking up ps4 controller axis inputs
I'm trying to get a character to move using the dpad on a PS4 controller. The controller works when I set the input to read a button(X, O, square, etc.), but it will not pick up the input for the any of the axes(dpad, joystick, Right/Left triggers, etc.).
This is the code I've been trying to get it to work with:
if (Input.GetAxis("Horizontal_p2") == 1 || Input.GetAxis("Horizontal_p2") == -1 || Input.GetButton("Horizontal_p2"))
{
p2.transform.position += Input.GetAxis("Horizontal_p2") * transform.right * moveSpeed * Time.deltaTime;
}
and this is a screenshot of the Input Manger:
Any help is appreciated.
capture.png
(21.7 kB)
Comment
Your answer
Follow this Question
Related Questions
XInput D-Pad and Triggers not working 0 Answers
how do i disable fps controler 0 Answers
Roll a ball to the direction it is facing 0 Answers
My character's axes are rotated when I get out of vehicle 0 Answers
VR stick action inputs 0 Answers