OpenXR MotionController Trigger not releasing in UE5

I migrated my VR project from UE4.26 to UE5 and I noticed I’m unable to “release” the grab. For testing I bound my mouse left and right click to grab left and grab right and in that case the grab detected both the press and release. But when I try to grab with the motion controllers, release is never fired.

I tried re-making my input bindings but that didn’t seem to make a difference, this is what my input bindings look like at the moment. Any idea why release is not triggering with the motion controllers?

Here is my code for binding the Actions/Axis:

void APlayerCharacter::SetupPlayerInputComponent(UInputComponent* playerInputComponent)
{
	//Setup game play key bindings
	Super::SetupPlayerInputComponent(playerInputComponent);

	//Player Jump.
	playerInputComponent->BindAction("Jump", IE_Pressed, this, &ACharacter::Jump);
	playerInputComponent->BindAction("Jump", IE_Released, this, &ACharacter::StopJumping);

	//Grab and Release: Left Hand
	playerInputComponent->BindAction("GrabWithLeftHand", IE_Pressed, this, &APlayerCharacter::OnLeftTriggerPress);
	playerInputComponent->BindAction("GrabWithLeftHand", IE_Released, this, &APlayerCharacter::OnLeftTriggerRelease);

	//Grab and Release: Right Hand
	playerInputComponent->BindAction("GrabWithRightHand", IE_Pressed, this, &APlayerCharacter::OnRightTriggerPress);
	playerInputComponent->BindAction("GrabWithRightHand", IE_Released, this, &APlayerCharacter::OnRightTriggerRelease);

	//Use Item: Left Hand
	playerInputComponent->BindAction("UseItemLeftHand", IE_Pressed, this, &APlayerCharacter::OnLeftTriggerPress);

	//Use Item: Right Hand
	playerInputComponent->BindAction("UseItemRightHand", IE_Pressed, this, &APlayerCharacter::OnRightTriggerPress);

	//Equip Item: Left Hand
	playerInputComponent->BindAction("EquipItemLeftHand", IE_Pressed, this, &APlayerCharacter::OnEquipLeftHandItem);
	
	//Equip Item: Right Hand
	playerInputComponent->BindAction("EquipItemRightHand", IE_Pressed, this, &APlayerCharacter::OnEquipRightHandItem);

	////Crush Item: Left Hand
	//playerInputComponent->BindAction("CrushItemLeftHand", IE_Pressed, this, &APlayerCharacter::OnLeftGripPress);
	//playerInputComponent->BindAction("CrushItemLeftHand", IE_Released, this, &APlayerCharacter::OnLeftGripRelease);

	////Crush Item: Right Hand
	//playerInputComponent->BindAction("CrushItemRightHand", IE_Pressed, this, &APlayerCharacter::OnRightGripPress);
	//playerInputComponent->BindAction("CrushItemRightHand", IE_Released, this, &APlayerCharacter::OnRightGripRelease);

	//Reset VR View
	playerInputComponent->BindAction("ResetVR", IE_Pressed, this, &APlayerCharacter::OnResetVR);

	//Player Sprint
	playerInputComponent->BindAction("PlayerSprint", IE_Pressed, this, &APlayerCharacter::OnSprintPress);
	playerInputComponent->BindAction("PlayerSprint", IE_Released, this, &APlayerCharacter::OnSprintRelease);
	
	//Player Movement Forward/Backward
	playerInputComponent->BindAxis("MoveForward_Y", this, &APlayerCharacter::MoveForward);
	playerInputComponent->BindAxis("MoveBackward_Y", this, &APlayerCharacter::MoveBackward);
	playerInputComponent->BindAxis("MoveRight_X", this, &APlayerCharacter::MoveRight);
	playerInputComponent->BindAxis("MoveLeft_X", this, &APlayerCharacter::MoveLeft);
}

Seems like the same issue we’re having with Index Grip Axis. My response:

We’re still looking into this as boolean input should work for axis mappings, and vice versa. But for the trigger you can use Valve Index Trigger as an Action Mapping instead of Valve Index Trigger Axis and that should solve your problem.

Thanks for getting back to me VictorLerp.

I tried using just Valve Index Trigger instead of Trigger Axis but it still did not fire. It looks like UE5 is simply not working with VR at the moment so I guess I’ll stick with UE4 until more support and updates come in.

I think using the grip on the controllers for grabbing is a bad idea, its so easy to accidentally grab stuff, not to mention there is a super fine line between grip and just holding the controller.

It’s very frustrating because I wasted a whole weekend bringing my project over, and trying to get VR to work in UE5.

Can you give me steps to reproduce? In the VR Template, adding Valve Index Trigger to the Grab Action Mappings works as intended.

  1. First create an FPS C++ template game in UE4.26.
  2. Enable SteamVR and create input bindings and action mappings for the motion controllers.
  3. I use the mannequin VR hands to grab so pulling the trigger animates the hands.
  4. Try to use trigger or axis trigger for the motion controllers. If you put a breakpoint in your code for the trigger on pressed and on released, they either wont fire (in the case of trigger) or only press will fire and not release (for trigger axis).

I tested my project in 4.26 and 4.27 and it works fine, but after upgrading the project to 5, the issue happens. I tried different combinations of OpenXR enabled, SteamVR enabled, and both enabled but all lead to the same result.

Does the issue reproduce in 4.26, or UE5? The SteamVR plugin will be deprecated, you should use OpenXR if you plan to upgrade to UE5

I tested my project in 4.26 and 4.27 and it works fine with no issues, but after upgrading the project to UE5, the issue happens.