playMaker

Author Topic: Joystick Triggers Button  (Read 2123 times)

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Joystick Triggers Button
« on: October 03, 2014, 10:49:17 AM »
Just started messing with joystick triggers for the first time. Unity makes it easy to set up, but I have a question about turning the back trigger, which is an axis, into a button.

I have a ship and when you click, it fires a shot but if you hold the button down, playmaker only recognizes it as one shot and doesn't loop. Since the joystick trigger is an action it is recognized as a continuous loop.

Any clever ideas on how to make the right trigger on a controller act as a button?
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Joystick Triggers Button
« Reply #1 on: October 03, 2014, 07:57:05 PM »
Create 2 FSMs. The first Fsm will get the Axis/Trigger (1 or -1 for L/R trigger). Now you can use the out come with a send event action. The send event should fire a Custom global event  to a Game object( use Owner). The second Fsm can have 2 states  that are each fired with a Custom Global Event ( one Event for the trigger either being pulled or not). Now just create whatever logic you need with states and actions.
« Last Edit: October 03, 2014, 07:58:51 PM by redikann »

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Joystick Triggers Button
« Reply #2 on: October 06, 2014, 03:25:05 PM »
Thanks, thats some good and easy logic.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez