I’m developing a Google Cardboard app with Unity where an object floating in the scene can be rotated in certain fixed directions by rotating one’s head. The idea is that the user can only rotate the object left/right/up/down (y-axis or x-axis), one direction at a time, by facing the corresponding direction. Upon facing that direction, the object rotates slowly, and only stops rotating if the user returns to face the center.
Using GvrViewer, I can get the Quaternion and the difference in angle from the center. However, I don’t know where to begin to get the general direction the user is facing in order to compute what axis to rotate the object around.