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

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!

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) :slight_smile:

Honestly I never had such problems with flipflops. They have an initial position flag which is used on initialization.