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 7, 2017 · 4 revisions

Daydream applications generally fall into one of two categories:

  1. Apps which have a natural "forward" direction
  2. Apps which offer exploration in every direction

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, it's often desirable to prevent the built-in headset re-centering from happening for experiences where headset re-centering might be confusing for users.

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