Announcement

Collapse
No announcement yet.

Pick up/drop an object - pressing vs holding a button in controler HTC

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

    Pick up/drop an object - pressing vs holding a button in controler HTC

    Dears,

    I'm writing in connection with HTC controller and assigned functionality. Instead of holding a button to grab the object I'd like to press the button and release but the object would be still in my hand. Of course to drop the object I have to do the same - press and release the button

    Thank you so much in advance for any help
    Regards
    Mateusz

    #2
    Originally posted by Braveshock View Post
    Dears,

    I'm writing in connection with HTC controller and assigned functionality. Instead of holding a button to grab the object I'd like to press the button and release but the object would be still in my hand. Of course to drop the object I have to do the same - press and release the button

    Thank you so much in advance for any help
    Regards
    Mateusz
    If you are using the standard VR template:
    • open the MotionControllerPawn blueprint
    • in the Event Graph scroll down to section called Handle Controller Input
    • on both ActionInput GrabLeft and GrabRight, use a FlipFlop connected to Pressed to toggle between Grab Actor and Release Actor. The Released output should be disconnected.
    That's it.
    CTO | Head of VR Development - Visit us at http://humanxr.com
    My UE4 Tutorials (mostly VR): https://goo.gl/GUvDyV

    Comment


      #3
      Originally posted by vr_marco View Post

      If you are using the standard VR template:
      • open the MotionControllerPawn blueprint
      • in the Event Graph scroll down to section called Handle Controller Input
      • on both ActionInput GrabLeft and GrabRight, use a FlipFlop connected to Pressed to toggle between Grab Actor and Release Actor. The Released output should be disconnected.
      That's it.
      Thank for help. That works!

      Comment


        #4
        Just for a little extra control, never use a FlipFlop. Set a variable (Bool) to keep track of the events. Just in case something will mess up with the FlipFlop (like opening a level or other)

        Comment


          #5
          Originally posted by Tredigraph View Post
          Just for a little extra control, never use a FlipFlop. Set a variable (Bool) to keep track of the events. Just in case something will mess up with the FlipFlop (like opening a level or other)
          Honestly I never had such problems with flipflops. They have an initial position flag which is used on initialization.
          CTO | Head of VR Development - Visit us at http://humanxr.com
          My UE4 Tutorials (mostly VR): https://goo.gl/GUvDyV

          Comment

          Working...
          X