-1
\$\begingroup\$

I'm putting in the inputs for the XBOX ONE controller in Project settings, but when I try to put in the values for the triggers and click on the next window, that value vanishes. I'm putting the value in Positive Button. I then tried it in the Negative with the same result.

I checked the spelling, axis and everything looks fine, so I'm unsure why it's suddenly vanishing and not letting me input a value.

Here is the input for the right trigger: enter image description here

Now when I put in the axis for the right trigger, like this: enter image description here

And I press enter, or click away, it clears the field like this: enter image description here

After setting it up as an axis, it's still not working: enter image description here

And setting the type to axis: enter image description here

Any idea on why it's doing this?

\$\endgroup\$
  • \$\begingroup\$ You're still not following instructions. You did not set the Type field to "Joystick Axis" and you did not modify the Gravity/Dead/Sensitivity fields as shown in the answer below. It's going to take much longer to solve your problem if you don't take the time to read answers thoroughly and follow every step they tell you to take. \$\endgroup\$ – DMGregory Feb 19 at 11:50
  • \$\begingroup\$ @DMGregory I have tried this before and it did not work. That's why I tried treating it as a button, but even when set up as an axis, it simply won't work. By this point, I'm certain it's a bug, because no matter what angle I approach this problem, how many tutorials I follow, or who I ask for help, this trigger does not want to work. I know it shouldn't be my controller, since it's XBOX ONE and everything shows it having the same set up as an Xbox 360 controller. I'm really stumped and I do read answers repeatedly to make sure I'm following them. \$\endgroup\$ – CraftyMaelyss Feb 19 at 13:21
  • \$\begingroup\$ Every example you've shown in this question is set up wrong, so we can't verify that you're encountering a new bug rather than a setup error. Can you show us an example where you've set up the axis correctly, and read it correctly using Input.GetAxis()? \$\endgroup\$ – DMGregory Feb 19 at 13:30
0
\$\begingroup\$

"Right Trigger" is not one of the button names Unity knows how to check. Neither is the number 10.

These special names that Unity looks for are listed in the docs here:

  • Normal keys: “a”, “b”, “c” …

  • Number keys: “1”, “2”, “3”, … Arrow keys: “up”, “down”, “left”, “right”

  • Keypad keys: “[1]”, “[2]”, “3”, “[+]”, “[equals]”

  • Modifier keys: “right shift”, “left shift”, “right ctrl”, “left ctrl”, “right alt”, “left alt”, “right cmd”, “left cmd”

  • Mouse Buttons: “mouse 0”, “mouse 1”, “mouse 2”, …

  • Joystick Buttons (from any joystick): “joystick button 0”, “joystick button 1”, “joystick button 2”, …

  • Joystick Buttons (from a specific joystick): “joystick 1 button 0”, “joystick 1 button 1”, “joystick 2 button 0”, …

  • Special keys: “backspace”, “tab”, “return”, “escape”, “space”, “delete”, “enter”, “insert”, “home”, “end”, “page up”, “page down”
  • Function keys: “f1”, “f2”, “f3”, …

The left/right triggers are not buttons at all, but axes. Axis 9 & 10 specifically, on Windows. You can find the mapping between buttons/axes and their joystick-indexed slots here.

To configure an axis like the analog sticks or triggers, you do not type anything at all into the "Positive Button" field. Because, again, they are not buttons. Instead, set the input type to Joystick Axis and select the axis number from the "Axis" dropdown near the bottom of the inspector for this input, as shown in this screenshot of a right trigger mapped control:

Screenshot of Unity Input manager showing configuration of the right trigger as described above

Note that the "Positive Button" field is deliberately left blank, and the axis is specified in the drop-down at the bottom. Axes typically also use lower gravity and sensitivity than buttons, with a larger dead range, but this is something you can tune for feel.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Unfortunately that didn't work either. \$\endgroup\$ – CraftyMaelyss Feb 12 at 5:27
  • \$\begingroup\$ "Didn't work" is never enough information to diagnose a problem. What specific steps did you take, and what specific outcome did you observe? \$\endgroup\$ – DMGregory Feb 12 at 12:24
  • \$\begingroup\$ I found out I was spelling them wrong (and that's entirely on me) but now I'm having trouble assigning the Dpad's individual arrows and the triggers. I've checked my spelling and mapping from what you showed me but the 10th axis vanishes like before, so I'm wondering if it's a bug with Unity itself P: What do you think? \$\endgroup\$ – CraftyMaelyss Feb 14 at 14:04
  • \$\begingroup\$ Again, an axis is not a button, so you do not write it in the "Positive Button" text field. You set the type to Joystick Axis and select the axis in the dropdown \$\endgroup\$ – DMGregory Feb 14 at 14:20
  • \$\begingroup\$ I have done this, but it still vanishes. I think it may be a bug, because I've followed so many tutorials, diagrams and asked around but still doesn't seem to work. \$\endgroup\$ – CraftyMaelyss Feb 14 at 14:27
0
\$\begingroup\$

Save yourself the trouble without reimplementing the wheel – use a proven, established controller plugin like InControl or Rewired.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.