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\$
  • \$\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\$ – Tristan Kreuziger Aug 20 '16 at 22:07
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").

| 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.