cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Gear VR controller as dpad on android?

t_sircar
Honored Guest
I am building an app using the oculus mobile sdk and want to use the gear vr controller as a dpad, meaning that I want to able to distinguish between left right up down CLICKS on the controller. 
I tried getting the coordinates of the clicked location but am unable to do so. This is because,

1.The Android dispatchKEyEvent function is not triggered on button clicks of the controller
2. On clicking the dispatch touch event function returns a fixed coordinate of 1480,650.
3. The vrFrameInput object also returns the coordinates mentioned in point 2 upon clicking

Ant idea how to go about it? Any help is appreciated. Thanks 🙂
6 REPLIES 6

t_sircar
Honored Guest
I'm able to get state of the vr controller, that is not an issue. I am able to get co-ordinates of the touch point but these co-ordinates are the same irrespective of where I click on the controller pad. My question again, is it possible to use the input to diffrenciate left right up down CLICKS. (Note, clicks, and not swipe,slide etc.)?

t_sircar
Honored Guest


@t.sircar

I will ask the teams in charge of this code their opinion on this functionality.


Yes, sure

t_sircar
Honored Guest
I am aware of this logic but as stated in my question, this does not work because the location of click is always the same ie. 1480,~600. 
If you place your finger on the left end of the controller and click or on the right end, the co-ordinates of the click recorded are the same and hence this logic won't work.

DHARMAKAYA
Protege
LOL...LOL@how completely lame that answer was. So that is what happens when fb buys a company? 

DHARMAKAYA
Protege
Seriously...include some EXAMPLE PROJECTS OF EVERY MAIN TYPE OF PROJECT A PROGRAMMER WOULD ACTUALLY WANT TO USE!!! Why are customers and 3rd party programmers being asked to do oculus's work?! Why is it so challenging for "t.sircar" to use the controller to make a directional pad to walk around?!

Seems RIDICULOUS!!! No wonder oculus has been failing so badly. Well...actually the zuckerburger is why...yet aside from that....

SkyMage
Explorer
I find the number of unanswered questions on this forum very troubling. The example assets are problematic and most of them don't appear to work out at all without some troubleshooting. I noticed, for example, that none of the scripts in the example scenes are namespaced, and each example contains its own "platformmanager" (and others) with totally different code. I don't want to make a list of all the things that have pissed me off.

As for the problem discussed above....what about tracking the touchpad coordinates on update, unless they're 1480,~600, and then on click, use the cached values.

Not sure if that would work or not, just a thought.