Announcement

Collapse
No announcement yet.

How to Detect Motion Controller Trigger Held Down

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to Detect Motion Controller Trigger Held Down

    Hi. I am trying to fire a weapon off holding the motion controller trigger being held down. Currently off the input 'motion controller trigger' i fire once, but am stuck how i read a hold to tell how long i should fire for. I don't see a trigger down or trigger up input in the list. Has anyone set this up before that can show me the light? Thanks!

    #2
    One way to solve this is to create a isFiring boolean variable. Set it to True when the trigger is pressed, set it to False when the trigger is released (input events).
    Then, inside your Event Tick, you can check for the status of the isFiring variable and act upon it.
    Cheers,
    Marco.
    CTO | Head of VR Development - Visit us at http://humanxr.com
    My UE4 Tutorials (mostly VR): https://goo.gl/GUvDyV

    Comment


      #3
      My problem is that there is no trigger is released input in the list of input to pick from, only 'trigger'. With the mouse inputs, there is a press and release input I can read for example.
      Click image for larger version

Name:	INput options.png
Views:	1
Size:	18.4 KB
ID:	1130198

      If its called something else, please tell me. This is my first VR game and there are these hidden gotchas, when i i already know how to do something in an fps environment. What I am trying to do now is use the Trigger Axis node to read how much of the trigger is pressed down. I haven't gotten it to work yet. Have you used this method before? I think 0 = not pressed and 1 = fully pressed, the documentation that i have found on the node is not great.Click image for larger version

Name:	Motion Controller Triiger Axis.PNG
Views:	1
Size:	36.2 KB
ID:	1130199

      Comment


        #4
        Ok I figured it out. I was trying to use action mapping bindings to kick off the firing events so i could get this to work across multiple devices easily. In this list, trigger release is not an option (i am piggy backing off the setup in the VR starter map):Click image for larger version

Name:	Input Action Settings.PNG
Views:	1
Size:	14.8 KB
ID:	1130202

        But if i drop the MotionController (L) Trigger node straight into my blueprint, then i see the messages you are talking about. D'oh. Thanks!
        Click image for larger version

Name:	MotionContollerTrigger.PNG
Views:	1
Size:	16.6 KB
ID:	1130203

        Comment


          #5
          Cool! Glad you solved it.
          Cheers,
          Marco.
          CTO | Head of VR Development - Visit us at http://humanxr.com
          My UE4 Tutorials (mostly VR): https://goo.gl/GUvDyV

          Comment

          Working...
          X