I came across an easily encountered bug when expanding from the 4.13 VR template, and I hope the solution is helpful to other devs. When a BP_PickupCube is destroyed (for example a subclassed actor that can be shot or one that breaks on collision with the world) while being held, the hand is stuck in the “grab” state until you grab another one.
An easy way to test this is to add a trigger that destroys BP_PickupCubes like this:
Grabbing a cube and moving it into the trigger will destroy the cube and leave your hand in the “grabbed” state even if you release/press the trigger again.
A simple fix is to add a connection to the BP_MotionController’s ReleaseActor function:
A slightly more complex fix that uses the controller rumble functionality when the cube is destroyed is to add this section to the main Event Graph of the BP_MotionController blueprint:
Again, I hope someone else finds this useful so you don’t need to waste time tracking it down. Thank you!