Showing results for 
Search instead for 
Did you mean: 

GearVR Controller (2017) debugging in Unity

Level 2
Good day,
I recently acquired the new GearVR 2017 model with the new controller. I am currently adding support for the controller in our app and was wondering if there is any way I can get the new controller to work within Unity? I know for Daydream there is a Daydream controller emulator app that lets me hook up the controller via the phone to my PC, is there anything similar for the GearVR controller?

Not applicable
yup!  From:

Gear VR Controller

Gear VR Controller provides orientation data through GetLocalControllerRotation(), which returns a quaternion.

Gear VR positions the controller relative to the user by using a body model to estimate the controller’s position. Whether the controller is visualized on the left or right side of the body is determined by left-handedness versus right-handedness, which is specified by users during controller pairing.

To query handedness of a paired controller, use IsControllerConnected() or GetActiveController() to query for RTrackedRemote or LTrackedRemote.

For example:

// returns true if right-handed controller connected

Use OVRInput.Get() to query controller touchpad input. You may query the input position with Axis2D:

OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad, OVRInput.Controller.RTrackedRemote);

A touchpad touch occurs when the user’s finger makes contact with the touchpad without actively clicking it. Touches may be queried with OVRInput.Get(OVRInput.Touch.PrimaryTouchpad). Touchpad clicks are alias to virtual button One clicks, and may be queried with OVRInput.Get(OVRInput.Button.PrimaryTouchpad).

To recenter a Gear VR Controller, use OVRInput.RecenterController().

The volume and home buttons are reserved.

Level 2
Thank you for your response metrocube. I am able to use the controller with my app on the phone, but would also like to be able to debug it from within Unity on my PC. What I mean with that is that in Unity Editor I would like to be able to use it, as it saves me debugging time (otherwise I would need to build and run my app in order to test changes).

I see that you are Oculus Staff, do you maybe also have an implementation for a pointer for Unity? Your samples do not provide a pointer, so that I can move the pointer with my controller and click on buttons. That is what I am currently implementing and building it every time to test a change to my code takes a while :smile:

EDIT: I am running Unity v5.6.0f3, Oculus Utilities v1.14.0, OVRPlugin v1.14.0.

Level 3
Hey nocatix I am attempting to find a solution to the unity editor controller interface as well. The only workaround I could find to connect the gear VR controller was to use the unity remote 5 app installed on the phone to display the scene to the screen and get input from the phone. The problem I'm having is getting the input from the controller to show up.

Level 3
Cross post from your thread on the Unity forums.

Your going to come across many hurdles attempting to do this, and I doubt Unity will officially do this for all the competing sdks (daydream, gear vr, etc.) at least not until it's in a unified Unity API which feels at least a year away. Perhaps Oculus will do this in the future but so far there isn't any indication that they will.

In my product, I've added emulation of the controller in editor via mouse/keyboard (ctrl click drag reorients the controller and alt click drag reorients the head). I may at some point down the road look into trying to get the hardware to connect via the editor but not sure if that is going to be feasible.!/content/88829

If you're looking for a more accurate approach without hardware emulation, I'd actually look into how google does it in their daydream sdk. They allow you to install an emulator app on your phone and then use it as a motion controller over wifi for the editor. Something like that would be more doable for Gear VR as well but would still take a decent amount of work.

Level 3
I wish this wasn't the case but, the best way to do this at the moment is to buy a rift with touch controllers and use those controllers for development. You'll still need to test on device of course but for quick iteration and testing during development, using the Rift with touch is your best bet.

Level 2
To be honest, support from oculus for Gear VR controllers is WAAAAAAAAY INEPT AND INCOMPLETE AND HONESTLY CRAP!!! OBVIOUSLY if I am coding MY OWN instead of buying A 3RD PARTY SOLUTION, then the team at oculus has been completely unreliable on this!!! WHERE IS A GRABBABLE SAMPLE AND A DIRECTIONAL WALK CONTROLLER SAMPLE?!!!!! SOOOOOO F'ING RIDICULOUS THAT crappy fb hires so many f'ing programmers and they STILL can't supply an F'ING BASIC SAMPLE with an F'ING hw product, when they have made LESS THAN 10 hw products EVER!!! WHAT AN F'ING SHITE company!!! I could design the board, I COULD DESIGN A MUCH BETTER CASING (WTF is with that strap connector?!), write the firmware, and make the F'ING EXAMPLES SOLO!!! And I could get it done with a tiny percentage of the wasted money that fb threw at the SHITE monkeys on h1b visas!!!

Level 2
Hey oculus team, POST SOME F'ING PROPER SAMPLE PROJECTS (including grabbable and directional movement without any F'ING SHITE swipe nonsense) FOR THE GEAR VR CONTROLLER SPECIFICALLY!!! 
I bought these f'ing products!!!

Level 2
Not what you are looking for but to allow debugging of the GearVR app & controller you can use the 'Gear VR Service' to run your app without the headset and debug it through adb

Level 2
Not what you are looking for but to allow debugging of the GearVR app & controller you can use the 'Gear VR Service' on the phone to run your app without the headset, and debug it through adb