[Gear VR] back button behavior

It seems that on 4.11p6, the back button immediately goes to the gearvr menu ‘go back to oculus home ?’

That was’nt the case before. How to get rid of that so we can implement our own behavior ?

the oculus home menu only has to be shown 0.7 seconds after pressing, so we can use that button for other stuff too…

Noticed the same thing - would be good to have that fixed for the 4.11 final …

So, how do you set up back button, touchpad and gaze control ?

FYI: I created a bug report for this: [GearVR] Back Button behavior no longer as expected in 4.11 P6 - UE4 AnswerHub

Hi Motorsep,

The back button is the same as the normal “Android Back Button”
The touchpad is the same as the normal android touchscreen “InputTouch”
and gaze control is done by Tracing (raycasts): (I’m using: “LineTraceForObjects”)

Hi aussieburger! Long time no see.

Are there any tutorials about Android Back button and InputTouch ?

Seems fairly trivial (looking at Tappy Bird), but what specific to Oculus VR function should it call ?

Also, how do you handle short press and long press ?

I used something like this for the long press:

long press function is: OVRGLOBALMENU
short press function is: OVRQUITMENU

Was very difficult to find that short press one as it is not documented anywhere.

So, I followed Epic’s tutorial to the tee

If I do short press on the device, I get asked “Do you want to exit Oculus Home?”. If I say no, I go into Universal menu instead of the game. If I do long press, I don’t see progress bar, I end up in the UM from which I can only go into Oculus Home.

Any ideas?

Using 4.11pre8.

So, I am in limbo with this issue:

This actually seem to kinda work in preview 8. If you press once u are asked whether u want to exit. If u press n hold, it goes in the UM. This is exactly the expected behavior.
However, the current problem is that with the latter the progress bar isn’t drawn, and in both cases the app crashes when u try to return.

Well, yeah, that happens without using any cmds and BP setup. It worked for me that way from the day one (after installing 4.11pre8). The core issue is that once you get into UM, there is no way back into the game. You can only go into Oculus Home.

Yeah, sure. A few minutes ago i read it’s a known issue in some of the threads u posted/linked… Can’t find it again.
What we can do is wait/hope for a fix. :slight_smile:


Something to add, just in case.

Setting gearvr.HandleBackButton to 0 turns off the automatic 4.11 handling of the GearVR back button and makes possible the execution of the blueprint solution that’s described in the Unreal Help (including drawing the progress bar, etc.). However the example in the docs only handles long press, so u’ll have to extend that blueprint if u want it to react properly on short press

Well, like I noted in the bug report, with that cvar set to 0, back button doesn’t work at all. So either it’s another bug, or Epic’s documentation yet again out of date :confused:

It does work here. Tested it just now. But again, in that case only long press is considered.

How does it work? Please describe. If I set cvar to 1, it indeed goes into UM, but I can’t get back into the game. If I set cvar to 0, the BP solution has to work (since I used Epic’s docs), but it doesn’t long press doesn’t do anything.

It sounds to me like “Unable to reach 60 fps” thread - so many claims that people can reach 60 fps, I get their project, run it and it goes only up to 58 fps. This is sound sooooo the same - people say “it works”, when it doesn’t :confused:

And if it does work, no one wants to correct me with my BP… Frustrating, least to say.

In the level blueprint I have an “Execute Console Command” with “gearvr.handlebackbutton 0” executed on “Event Begin Play”

I have the setup outlined in the docs in the HUD.

Build, start on the gear VR. When u press and hold the “Back” button the progress bar appears, and if u hold long enough, u’r sent to the UM.

If you have “gearvr.handlebackbutton 1”, which seems to be the default, the thing in the HUD blueprint is ignored completely. The reason the progress bar works on the PC regardless of the state of “handlebackbutton” is that the PC doesn’t care about the gearvr specific commands, and also whatever button u use to trigger it is not the android “back” button which this thing specifically targets.

The fact that u can’t go back to the game, however, e is a separate bug, for which there’s no solution at the moment (that I am aware of).

I doubt people around here just say random **** to annoy each other. Keep in mind that we all run different setups which increases the likelihood of something else interfering.

By the way, I think I might have found a solution for the other problem, too, but will post on that matter in the devoted thread to keep things here to the point.

I decided to put back button to FPS controller instead of HUD BP - works (at least triggers printout when pressed). If I keep it in the HUD class as per Epic’s docs - it doesn’t work. Any idea why?

Never mind, I figured it out :o

Interesting, when I was building my project with fully functional UM BP, I got the following warnings:

Even with that it worked! Thanks folks, I couldn’t have done it without your help!

So, now that 4.11 is released, can someone already confirm if we can go back into the game from UM ?