Set Up Motion Controller for Google Daydream VR

Setting up Google Daydream VR motion controller to work with Unreal Engine.

Choose your operating system:

Windows

macOS

Linux

Prerequisite Topics

In order to understand and use the content on this page, make sure you are familiar with the following topics:

The Google Daydream Motion Controller allows you to interact with your Unreal Engine project like never before by enabling users to pick up and interact with objects like they would in the real world. In the following How-To, we will take a look at how you can set up your Unreal Engine projects to work with the Google Daydream Motion Controller.

This How-To will utilize the Pawn the that was created in the Set Up Cameras for GoogleVR How-To . If you have not completed this How-To it is highly suggested you do before continuing.

Motion Controllers will work only with devices that support the Google Daydream SDK.

Steps

Below you will find information about how to add the ability for your player Pawn to use the Google Daydream Motion Controller.

  1. Once the Editor has loaded, from the Main Toolbar , open the Edit tab and select the Plugins menu item.

    EditPlugins.png

  2. In the Plugins menu, make sure that the Google VR Motion Controller plugin is enabled.

    GoogleVRMotionControllerPlugin.png

  3. Open up the player pawn you want to add Motion Controller support to. In this example, our pawn is called GoogleVR_Pawn_MotionController . Then in the Components tab, click on the Add Component button and search for GoogleVRMotionController .

    HTGoogleVR_MC_00.png

  4. Drag the newly added GoogleVRMotionController on top of the existing VRCameraRoot so that it is a child component like the VRCamera .

    HTGoogleVR_MC_01.png

    By default, the GoogleVR Motion Controller Component's Location should be set to (0, 0, 0) when added to your Pawn. If for some reason this is not the case, make sure to set the location to (0, 0, 0).

  5. Set the Motion Source property of the MotionControllerComponent inside of the GoogleVRMotionControllerComponent to AnyHand .

    Prior to Unreal 4.21.0, 3DOF controller support with Daydream apps was automatic. Beginning in 4.21.0 Unreal added support for Daydream 6DOF dual controllers. Application developers must now set Motion Source to AnyHand .

    Click for full image.

  6. Compile and save the Blueprint and then drag the GoogleVR_Pawn_MotionController Pawn from the Content Browser to the Level.

    Click for full image.

  7. Select the newly added Player Pawn and in the Details panel, make sure to set the Auto Possess Player to Player 0 so that we will use this Pawn when the Level is running.

    HTGoogleVR_MC_02.png

  8. Finally, press the Launch button to deploy and run this Level on your Google Daydream-enabled smartphone.

    HTGearVR_MC_04.png

End Result

When your project launches, put your phone in your GoogleVR headset and pick up your GoogleVR Daydream Motion Controller. Now when you move the Motion Controller around in the real world, you should see that movement replicated in your Unreal Engine project like in the following video.

If the GoogleVR Motion Controller mesh seems to be in the wrong location, hold the Motion Controller out in front of you and then press and hold the Home button to re-calibrate the Motion Controller position.

Unreal Engine Project Downloads

Below, you will find a link to where you can download the Unreal Engine project that was used to create this example.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss