0
\$\begingroup\$

I'm currently using a xbox 360 controller on my windows 10 computer. I've been trying to find how to use the LT and RT buttons on my controller to shoot and aim. Can some one give me an example on how to receive and use input with these buttons? I am using javascript, so it would be helpful to have it in that programming language! Thank you in advance!

\$\endgroup\$
1
  • \$\begingroup\$ I have no controller to test, but this seems to be the same question: Unity Answers. Once you set the controller up you should be able to use it as other input devices Using Input Axis. \$\endgroup\$ Commented Aug 20, 2016 at 22:07

1 Answer 1

1
\$\begingroup\$

You can not directly reference axis via programming. The InputManager requires you to set them up, manually. You can then reference the axis via their string identifiers.

LT, RT and "LT+RT" set up as axis (9th, 10th and 3rd, respectively) in the Unity Input Manager.

Once set up like this, you can use Input.GetAxis([Name]). To grab LT (9th Axis), given the above setup, you would use Input.GetAxis("LeftTrigger").

\$\endgroup\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .