How to react to recentering by the user with the home button in UE4?
There is mention of it being possible with Unity in the doc: https://developers.google.com/vr/unity/controller-basics#recentering
but nothing for UE4 My game is a 360 game where the menu can appear at any HMD yaw. Recentering with the Daydream controller always moves the HMD back to Yaw 0 which means my menu is then located somewhere else but not centered. Ideally HMD yaw is not changed on a recenter only the controller is recentered to the current HMD yaw. Alternatively we need at least an event.
I also requested some from google side here: https://github.com/googlevr-unreal/UnrealEngine/issues/5
but the issues section there seems dead.
According to the requirements: https://developers.google.com/vr/distribute/daydream/design-requirements#UX-D6
If the app involves your user moving
around a 360° environment with no
strong notion of which way is
âforwardâ (for example, StreetView),
then on recenter your app must
preserve the userâs orientation with
respect to the environment at the time
of the recenter. When the user starts
the recenter operation, the app should
compute the offset needed to correct
the controllerâs position, and then,
before drawing the next frame, rotate
the environment by said offset. From
the userâs perspective, the controller
is now recentered and their
orientation with respect to the
environment hasnât changed. That is,
the object that was in front of the
user before the recenter is the same
object that is in front of the user
after the recenter.
unfortunately we do not know when the Home button is pressed so itâs not possible to calculate the offset.
For now I have done a dirty workaround in my blueprints to get it working but itâs definitely not ideal and would not fit to every use case.