[Gear VR] Examples for controller / buttons mapping ? — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

[Gear VR] Examples for controller / buttons mapping ?

motorsepmotorsep Posts: 1,363 Oculus Start Member
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 

Comments

  • aussieburgerVRaussieburgerVR Posts: 202 Oculus Start Member
    Oculus have already documented your queries here:

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

    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-30th-2017

  • motorsepmotorsep Posts: 1,363 Oculus Start Member

    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?
  • rpalandrirpalandri Posts: 63 Oculus Staff
    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 :)
  • motorsepmotorsep Posts: 1,363 Oculus Start Member
    @rpalandri Ah, I see. Btw, any good reason for restricting buttons remapping on the controller ?
  • aussieburgerVRaussieburgerVR Posts: 202 Oculus Start Member
    edited April 2017
    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?
  • motorsepmotorsep Posts: 1,363 Oculus Start Member
    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 ?
  • leotrapleotrap Posts: 1
    NerveGear
    What happened with all this? Does anyone make it work?
  • motorsepmotorsep Posts: 1,363 Oculus Start Member
    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.
Sign In or Register to comment.