This site has been permanently archived. The content on this site was last updated in 2019.
Recentering for Daydream apps in Unity
Stay organized with collections
Save and categorize content based on your preferences.
Orientation and movement types
Daydream apps usually have one of the following types of visual orientation:
Natural forward direction
Example: Daydream Home environment that you see when you press the home button.
Visual exploration in any direction (360° experience apps)
Example: An open environment that lets you point your gaze in any direction.
Default recentering behavior reorients the Daydream controller and the user's
visual orientation in VR. Controller recentering is useful in either type of
app. However, 360° experience apps must preserve the user's orientation on
recenter.
Default recentering behavior
Default recentering behavior is designed for apps with a natural forward
direction. It lets users reorient themselves in VR and compensate for certain
types of sensor drift.
Users can long-press the Daydream controller "home" button to:
360° experience apps
Controller recentering should be provided in every Daydream app.
However, apps with a 360° environment and no natural forward direction
must preserve the user's visual orientation on recentering design
requirement
UX-D6
To prevent headset re-centering in 360˚ experience apps, add the
GvrRecenterOnlyController
script to a game object in your scene.
This script counteracts the built-in rotation adjustment by
making an equal and opposite adjustment to the Daydream pointer and the parent
of the camera.
Apps with a natural forward direction should not use this script.
Developers of 360˚ experience apps can also use the
ReorientOnLoad
script to orient the user correctly on entering a scene regardless of their
previous orientation.
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."],[[["\u003cp\u003eDaydream apps primarily utilize two visual orientation types: natural forward direction and 360° exploration.\u003c/p\u003e\n"],["\u003cp\u003eDefault recentering realigns both the controller and user's view, mainly benefitting apps with a natural forward direction.\u003c/p\u003e\n"],["\u003cp\u003e360° apps require preserving the user's visual orientation during recentering, achieved using specific scripts like \u003ccode\u003eGvrRecenterOnlyController\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eReorientOnLoad\u003c/code\u003e script helps 360° apps correctly position the user upon entering a scene, irrespective of their prior orientation.\u003c/p\u003e\n"],["\u003cp\u003eController recentering should be implemented in all Daydream apps for optimal user experience.\u003c/p\u003e\n"]]],["Daydream apps utilize either a natural forward direction or 360° visual exploration. Users can reorient the controller and virtual camera by long-pressing the \"home\" button. While controller recentering is universal, 360° apps must preserve the user's visual orientation during this process. To achieve this, 360° apps should implement the `GvrRecenterOnlyController` script, and may use the `ReorientOnLoad` script, whereas natural forward direction apps should not use `GvrRecenterOnlyController`.\n"],null,["# Recentering for Daydream apps in Unity\n\nOrientation and movement types\n------------------------------\n\nDaydream apps usually have one of the following types of visual orientation:\n\n- **Natural forward direction**\n Example: Daydream Home environment that you see when you press the home button.\n\n- **Visual exploration in any direction** (360° experience apps)\n Example: An open environment that lets you point your gaze in any direction.\n\nDefault recentering behavior reorients the Daydream controller and the user's\nvisual orientation in VR. Controller recentering is useful in either type of\napp. However, 360° experience apps must preserve the user's orientation on\nrecenter.\n\nDefault recentering behavior\n----------------------------\n\nDefault recentering behavior is designed for apps with a natural forward\ndirection. It lets users reorient themselves in VR and compensate for certain\ntypes of sensor drift.\n\nUsers can long-press the Daydream controller \"home\" button to:\n\n- **Reorient the controller** so that it points directly in front of the user.\n\n- **Reorient the virtual camera** so that the scene's natural forward\n direction is directly in front of the user.\n\n360° experience apps\n--------------------\n\nController recentering should be provided in every Daydream app.\nHowever, apps with a 360° environment and no natural forward direction\n**must** preserve the user's visual orientation on recentering design\nrequirement\n[UX-D6](https://developers.google.com/vr/distribute/daydream/design-requirements#UX-D6)\n\nTo prevent headset re-centering in 360˚ experience apps, add the\n[GvrRecenterOnlyController](//github.com/googlevr/gvr-unity-sdk/blob/master/Assets/GoogleVR/Scripts/Controller/GvrRecenterOnlyController.cs)\nscript to a game object in your scene.\nThis script counteracts the built-in rotation adjustment by\nmaking an equal and opposite adjustment to the Daydream pointer and the parent\nof the camera.\nApps with a natural forward direction should not use this script.\n\nDevelopers of 360˚ experience apps can also use the\n[ReorientOnLoad](//github.com/googlevr/daydream-elements/blob/master/Assets/DaydreamElements/Common/Scripts/Utility/ReorientOnLoad.cs)\nscript to orient the user correctly on entering a scene regardless of their\nprevious orientation."]]