Language:
Page Info
Skill Level:
Engine Version:

Samsung Gear VR Global Menu Blueprint Setup

With the GearVR_GlobalMenu HUD now assigned as the game HUD, we can now start to build the Blueprint logic that will call the menu based on the requirements from Oculus.

  1. Open up the GearVR_GlobalMenu Blueprint by Double - Clicking on it inside of the Content Browser.

  2. Once the GearVR_GlobalMenu Blueprint is open, go the Event Graph and then delete everything that is there leaving a blank graph to work with.

    T_Empty_BP.png

  3. In the Variables section create the following variables types with the following names.

    T_Variable_Names.png

    Variable Type Name Default Value
    Boolean Invoked False
    Float IncrementGlobalMenuPressTimer 0.0
    Float GlobalMenuPressTimer 0.0
  4. In order for the HUD to know that the back button is being pressed on the Gear VR Head Mounted Display (HMD) we have to enable the HUD to receive input signals by using the Enable Input node. Inside of your HUD Blueprint add and connect the nodes like in the following image.

    T_Enable_HUD_Input.png

    If you are having issues finding Enable Input try turning off Context Sensitive and searching for it again.

    T_Turn_Off_Context_Sensitive.png

  5. Now that the HUD can receive button inputs, add and setup the following nodes so that when the Android Back button is pressed we can enable the Global Menu. Then, when it's released, we can reset everything for the next time it is pressed.

    T_Key_Input.png

    To quickly test to see if your button logic is working, add a keyboard input key as an additional input to the back button. While this will not active the Global Menu while testing on PC, it will be able to help you see everything up till the menu is supposed to be called helping you see if everything is connected correctly.

    T_Testing_Tip.png

  6. With the back button able to send and receive events we now need setup some logic to call the Global Menu after the back button has been held down for more than 0.75 seconds to meet the requirements set by Oculus. Setup up your HUD Blueprint to match the image below:

    T_Timer_Logic.png

  7. Input 0.75 in the B input of the >= Node then input OVRGLOBALMENU into the Command section of the Execute Console Command node.

    T_Timer_Values.png

  8. Finally as per the instructions from Oculus, we need to display something that will grow over time to notify the user the Global Menu is being activated. Add and setup the nodes in your Blueprint to match the image below:

    T_Draw_HUD.png

  9. When everything has been completed your Blueprint graph should look like this:

    T_Final_Graph.png

  10. Now you can package your project up and deploy it to your Smartphone to use with the Samsung Gear VR HMD. To see the menu in action, launch your project and then hold down the back button that is on the side of Samsung Gear VR HMD. As you do you will see a line being drawn across the screen and then when it finishes the Global Menu will be displayed.