VR - Can't interact with 3D widget with the left motion controller

Hello!,

I have a problem in my VR scene, i have two motion controller and i created a 3d widget in my scene with a button with a number that increases when clicked . The button work perfectly with the right controller but when i click on it with the left, my blueprint detect the click but the number does not increase. And it’s like the left controller doesn’t exist because when i aim the button, the button it’s not hover.

I don’t know what is the problem, i do the same things like the function grab on the blueprint.

I think the problem come to the sort of raycast/linetrace by the left controller because when i aim the button with the right controller and click with the left controller the number increase, so i don’t think it’s a blueprint problem.

Thank you in advance for your help.

Hey Friend,
refer to my image, somehow you need to change you second widget interactions ‘virtual user index’ to a different number compared to the other widget interaction in the other hand. The way I have it in my image works for me but looks as if you are doing it slightly different but good luck.

1 Like

thats right, but when you use the VRTemplate the left controller is “spawned” at event begin play so you cant attach something on the components tab.
The WidgetInteraction will be on both motion controllers and even hover and click works but when you click with the left motion controller, its like the event does not get fired.

I found the solution, a friend got the same problem and its a bug… on the menu just use “on pressed” not “on klicked” works for me :slight_smile:

Hi guys, thanks for the reply but it’s doesn’t work for me.

My problem is when I aim the widget with the left controller it’s like the raycast bug and i need to spam my button for interact with the widget. I don’t know why because it’s works perfectly with the right controller and i did the same for both.

You have to set both Virtual User Index and Pointer Index to 1.

If you’re using the VR template, put this in Begin Play (that’s a collapsed node). Leave the default values at 0.

1 Like

I tested this and it’s sufficient to only set the Pointer Index to a different number on the right controller

yes, that’s a step. Also, if your trigger of the left controller can’t work without the right pointer, you need to uncheck “consume input” on the “MotionController (X) Trigger” nodes.

That worked for me perfectly, thanks!

This is not necessary as WidgetInteractionRight on VRPawn in the VRTemplate already has the Pointer Index set to 1, there’s no need to set it again unless you’ve modified it. Each Widget Interaction Component needs its own Pointer Index, and each player can have Left = 0, Right = 1. However, the Virtual User Index has to be unique for each player, and should be the same for each Widget Interaction Component that belongs to that player.

1 Like

Do we need to set this whenever a new player spawns in the server?

Yeah, even if the Widget Interaction Components only exist on the owning client the Virtual User Index has to be unique for each player