cancel
Showing results for 
Search instead for 
Did you mean: 

[Gear VR] Examples for controller / buttons mapping ?

motorsep
Rising Star
Two questions in one 🙂

#1. Are there any example projects from Oculus for Gear VR controller (BP-only) with controller/hand mesh and fully functionality included, for UE 4.15.2 ? (I assume 4.15.1 won't have support for Gear VR controller)

#2. Would it be possible to map controller buttons however we please, while keeping HMD's touchpad and buttons function as intended by default ? (for example, I want to use volume buttons on the controller for something else other than volume; same goes for home/back buttons on the controller)

Thanks 
8 REPLIES 8

Anonymous
Not applicable
Oculus have already documented your queries here:

https://developer3.oculus.com/documentation/game-engines/latest/concepts/unreal-input/#unreal-gear-v...

1: There is an example project: "We provide a sample called GearVRControllerSample in the directory <install>/Samples/Oculus."
It's not 100% perfect since it does not use the gearvr controller component with the controller mesh but it's easy to switch to it instead of using the default motion controller like in the example.

2: Button mappings are listed however: "The volume and home buttons are reserved."

One thing I haven't worked out yet is if the user is playing with the controller or not - "is controller active" appears to return false for me.

PS: it's already live in the latest Oculus branch as per: https://forums.oculus.com/developer/discussion/51262/unreal-engine-4-integration-1-13-released-march...

motorsep
Rising Star



2: Button mappings are listed however: "The volume and home buttons are reserved."

One thing I haven't worked out yet is if the user is playing with the controller or not - "is controller active" appears to return false for me.



Oh, that's pretty awful 😕 Controller could have a ton of extra keys if they were remappable. Why dub volume buttons if headset has them already 😕

Would you please ping here if you figure out that issue with active controller node?

rpalandri
Expert Protege
Hey @aussieburgerVR, I was wondering, how do you sample IsControllerActive? We recommend querying it every frame, to handle the controller being connected/disconnected (running out of battery), and also because usually the first frame will report IsControllerActive as false (needs time to connect to the game). Let me know if you still have issues there.

@motorsep : FYI the first public release that will have GearVR controller integration is 4.16. Releases like 4.15.1/2 are just bugfix releases, not releases with big features like a new controller 🙂

motorsep
Rising Star
@rpalandri Ah, I see. Btw, any good reason for restricting buttons remapping on the controller ?

Anonymous
Not applicable

rpalandri said:

Hey @aussieburgerVR, I was wondering, how do you sample IsControllerActive? We recommend querying it every frame, to handle the controller being connected/disconnected (running out of battery), and also because usually the first frame will report IsControllerActive as false (needs time to connect to the game). Let me know if you still have issues there.



Yeah I figured that out 🙂 I ended up querying on every button press since the player is often pressing one of the buttons and needs to do so after the intro - seemed a bit for performance than querying every frame

It might be nice as an improvement to offer a GearVR Controller Event when it becomes activated?

motorsep
Rising Star
Sorry folks, but that example from github is ... bizarre. I don't get how that BP code related to GearVRController component.

Can someone please explain how to set it up properly ?

leotrap
Honored Guest
What happened with all this? Does anyone make it work?

motorsep
Rising Star

leotrap said:

What happened with all this? Does anyone make it work?


Not quite. I got controller tracking, but I couldn't get touchpad to work the same way as on the HMD. So I only use trigger on the controller and pressing down on the controller's touchpad.