This site has been permanently archived. The content on this site was last updated in 2019.
Getting started with 6DoF controllers in the Android NDK
Stay organized with collections
Save and categorize content based on your preferences.
This guide shows you how to set up Google VR development with the Android NDK
and build the HelloVRBeta sample app. This app is designed to help you learn
about working with the see-through mode technology as well as the experimental
6DoF controllers and faceplate.
- Download and install the latest version of
gvr-android-sdk\*.zip
from the
releases page.
Follow these steps to build and run the HelloVRBeta sample app.
The requirements and steps to build the sample app using the NDK are nearly the same
as building the HelloVR sample app for the SDK, with the following key changes:
- Download the latest version of the
Android NDK.
Extract the NDK .so
files by running:
./gradlew :extractNdk
In settings.gradle
, uncomment the following line:
include ':samples:ndk-hellovrbeta'
To build and run the sample app in Android Studio, select samples-ndk-hellovrbeta as your target.
If you're familiar with developing for Daydream, here are the changes you need
to make in order to support the 6DoF controllers and faceplate:
To identify your app as supporting the 6DoF controllers and faceplate, add the
following meta-data tag to
your AndroidManifest.xml
file within the <activity>
element:
<activity …
<meta-data android:name="com.google.vr.controllers.supportedConfigs"
android:value="3Dof|2x6Dof"/>
</activty>
Make sure your gvr_controller_create_and_init()
call specifies
GVR_CONTROLLER_ENABLE_POSITION
; otherwise, the position data will be discarded.
Using the controllers after setup
Fluorescent lighting and HTC Vive Lighthouses are both known to interfere with
tracking. Turn off the Vive Lighthouse if you have one, or move to a room
with different conditions.
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["This guide provides instructions for setting up Google VR development with the Android NDK."],["It focuses on building and running the HelloVRBeta sample app, which demonstrates see-through mode, 6DoF controllers, and faceplate technology."],["Developers familiar with Daydream can find specific instructions for adapting their apps to support the new 6DoF controllers and faceplate."],["The guide outlines steps for downloading necessary tools, extracting files, and configuring project settings in Android Studio."]]],["This guide outlines setting up Google VR development with the Android NDK and building the HelloVRBeta sample app. Key steps include downloading the `gvr-android-sdk` and Android NDK, extracting NDK `.so` files via `./gradlew :extractNdk`, and including `':samples:ndk-hellovrbeta'` in `settings.gradle`. To support 6DoF controllers, add a specific meta-data tag in `AndroidManifest.xml` and use `GVR_CONTROLLER_ENABLE_POSITION` in the `gvr_controller_create_and_init()` call. Certain lighting conditions can affect tracking quality.\n"]]