Daydream Controller recentering and UE4

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 :frowning: 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. :frowning:

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.

Google answered my query here: https://github.com/googlevr-unreal/UnrealEngine/issues/5

and I found the blueprint node hidden here: