playMaker

Author Topic: Get 360 Triggers Action  (Read 2438 times)

crush

  • Playmaker Newbie
  • *
  • Posts: 24
Get 360 Triggers Action
« on: December 09, 2015, 03:03:22 PM »
Hi I am having a lot of trouble getting the controller triggers on a 360 controller to fire off and event when pressed. I have the get 360 trigger action and get left / right trigger actions also from ecosystem. I think my issue is somewhere between setting them up in the unity input manager and the documentation on the 3rd axis names etc. this page http://wiki.unity3d.com/index.php?title=Xbox360Controller
I'm doing this for Windows BTW with those settings.
I have named new inputs in the input manager to LT and RT and set them to 3rd axis in the button name I am trying to use 9 and 10 however it won't let me input 10 for some reason. I feel kind of lost with this because i'm not 100 sure how to fill out the fields in the input manager to work correctly with the actions, does anyone happen to have a good example of how to set up the input manager to work with these trigger actions?. Thanks for any help:)

foxdeltagames

  • Junior Playmaker
  • **
  • Posts: 62
Re: Get 360 Triggers Action
« Reply #1 on: December 10, 2015, 12:43:31 AM »
RT and LT cant be used as buttons there are axises. So what you do in the input setting make an input for LT and RT. Mark LT as axis 9 and RT axis 10 also make sure to set to detect joystick movement.

The way it works in windows is the LT and RT axis starts at 0 and ends at 1 ( depending on the multiplier you set)depending on how far you pull on LT or RT. So you can say 0 is not pressed and anything greater than 0 is being pressed.

So make a fsm and drop in a "get axis" action. In the action type in the result of the axis you want to get, in this case either LT or RT. And then make a float variable call it anything you want have it exposed in the inspector. Back to the get axis action store the result to the variable you created. Hit play and pull on the axis you told the "get axis" to detect the axis change. Now you can now see when you pull on the trigger it is actually detecting the change


So make it work as a button add a float compre action and set up if anything greater than 0 is peress or equal to 0 is not pressed.

Hope this helps, and make sense to you. Ill make a vid late so you and others can see what im talking about.
« Last Edit: December 11, 2015, 03:12:38 PM by foxdeltagames »

crush

  • Playmaker Newbie
  • *
  • Posts: 24
Re: Get 360 Triggers Action
« Reply #2 on: December 11, 2015, 01:54:54 PM »
Hi foxdeltagames, thank you so much for the detailed explanation, I'm going to try this out tonight. I'm still surprised that it's so complicated to use a fairly common function of a controller, I imagine a bunch of people must have this same issue. Thanks again for the help much appreciated:)!.

crush

  • Playmaker Newbie
  • *
  • Posts: 24
Re: Get 360 Triggers Action
« Reply #3 on: February 25, 2016, 05:32:36 AM »
Hey foxdeltagames, just wanted to come back and say thank you so much, this works perfectly!. I've been trying to get those working forever and now it's all as should be. Thanks again