Download

Assistance needing Vive Controller to work with UMG without point and click

Afternoon All,

I have come to a stall in my development I’m currently doing for work. I have a Vive controller and I’m needing to code it along with a UMG Menu system. Now I have this fully functioning and looking pretty good when it spawns in the world and you can point the Vive controller and click on an option, works beautifully. All this menu is doing is calling the Variant Manager and what ever option is bound to the button that is on the UMG and does it’s thing. What I’m trying to do is now have an option so you use the Trackpad Left, Right, Up, Down to go through the button options. So I have set up the menu to work with a gamepad controller, and yes works how it should but then when I try and add in the Vive functionality it’s not doing anything. It’s as though it’s not calling the option as you try and click between the different buttons. For example I simply need what you see here to call the right option and perform that function: https://i.imgur.com/o8DgvKV.png
I have coded the Menu Button on the Vive Controller to turn the menu on and off, which it does. I have tried it by coding in inputactions and casting to the ControllerPawn but it hasn’t worked. Then this option was setup and all this does is flick between 2 buttons on the menu and then calls the options accordingly: https://i.imgur.com/B0Eyan1.png However when I then went and modified it into the larger menu it stopped working. This worked once but then when we was migrated to another project to test it stopped working. As you can see it is calling the Vive Controller and then the position is being set depending if you click left or right on the controller. On the larger menu I have it connected to Slate brushes so the correct button icons appear if it’s normal, hovered, or pressed. If anyone has successfully got something like this going or has some clues I’d be greatly appreciative to hear. I am starting to go goggly eyed and barmy trying to figure it out…and I might be over thinking it, which I often do, but any help would be appreciated! And yes of course I have exhausted the internet, I always do that first!

Thanks all

Regards
Shez

How did you implement regular Gamepad support for the menu? Giving us those details might make it possible to help, since the Vive controller inputs should be able to call the same Input Events.

Hi VictorLerp,

Sorry I should have added this in also. So on EventTick I have the buttons set to check if any have been hovered or pressed once the menu is open: https://i.imgur.com/uzZHfHZ.png and I also have on EventConstruct the construction of the buttons to their icons accordingly so when they are hovered or pressed the correct buttons are selected: https://i.imgur.com/uzZHfHZ.png And of course on pressed of whatever button is calls the correct event I want it to do. I had an epiphany last night which I’m about to try and if it works will post I have it otherwise back to the drawing board.

Regards
Shez

1 Like

Ok just updating what I have been trying, or more to the point, testing. I am still unable to have the buttons swap between A, B, C etc. I ran a test and had the UMG simply print a string if one of the options from the controller was pressed once the menu was opened. Now the option once you pressed an button worked (which at this stage is the button it is focused on when it’s opened), which is set to the Trigger on the Vive Controller. So it’s through a branch which is simply getting the player controller and checking “Is Input Key Down” and that input key is Vive (R) Trigger. However if I set up a test if I test for input key of “Vive (R) Trackpad Right” or “Vive (R) Trackpad Left” it doesn’t fire. It’s as though the buttons don’t exist on the trackpad. I have checked the options do work by setting an Action Input and from the controller pawn simply call the action and print a string to the screen, this works. I haven’t yet tested other options on the Vive Controller as they are set to do certain functions so I will disable and try but any ideas would be appreciated.

Thanks
Regards
Shez

Are you executing the Input events in the UMG Blueprint, or in the Player Controller/Pawn and passing that to the UMG? UMG doesn’t listen for Input Events so you have to pass that input from an Actor that does.

Hi VictorLerp,

Ahhh was trying from UMG as had been thinking perhaps I need to pass it through say the ControllerPawn or the likes. I’m newish to VR coding so still getting my head around it hence why I can do other options with my eyes closed. Ok…thanks for this, I’ll give it a shot passing it through the ControllerPawn…

Regards
Shez