Skip to content
This repository was archived by the owner on Nov 8, 2019. It is now read-only.

Preventing automatic recentering

Fred Sauer edited this page Aug 8, 2017 · 4 revisions

Daydream applications generally fall into one of two categories:

  1. Apps which have a natural "forward" direction
    • Example: Daydream home world you see after pressing home
  2. Apps which offer visual exploration in every direction
    • Example: An open world where you can go anywhere, see any place

Daydream's built-in behavior is designed for apps which have a natural "forward" direction. With no additional development effort your users will automatically be able to recenter themselves by holding down the controller home button while they aim straight ahead. Both headset and controller rotation will automatically be reset.

While controller re-centering makes sense regardless of the type of experience, if your app involves your user moving around a 360° environment with no strong notion of which way is "forward", then on recenter your app must (design requirement UX-D6) preserve the user’s orientation with respect to the environment at the time of the recenter.

Currently (as of 1.70.0) the best way to prevent headset re-centering for 360˚ apps is by adding the GvrRecenterOnlyController script to a game object on your scene. This script will counteract 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˚ apps may also be interested in the ReorientOnLoad script from daydream-elements which makes sure that the player is oriented in the correct direction when entering a scene regardless of the direction that they were facing at the time.

Clone this wiki locally