When an AFrame <scene>
gets loaded and a camera
component has been set with look-controls
enabled, how does the current orientation of the device (mobile) set the values of rotation and position of the camera?
Since a scene will have a certain point of origin. I have found that when open the scene from different positions the initial view is different, while I would like it to be the "look ahead" view.
The code is simple:
<a-entity camera="userHeight:1.6" look-controls></a-entity>
look-controls
takes the orientation from the sensors of the phone that is absolute and not relative to where you position the camera initially in the scene. The initial values are overridden by those coming from the sensors. Phones in 2017 do not have positional tracking but have a head neck model and calculate the position of your eyes with respect of the base of your neck which is the rotation pivot.I don't know the context of your application but in VR you cannot rely on the same degree of control of the camera that you would have on a traditional 3D application. If you require the user to look in a certain direction you can place hints or indications to influence the user's behavior.