Forum Discussion
Anonymous
6 years agoRotate camera within OVRCameraRig
Hi,
so what I am trying to do, is to change the OVRCameraRig's position and rotate the CenterEyeAnchor afterwards, so it is facing the point it was looking at before the position change.
This worked for a normal camera but somehow it doesn't work for the CenterEyeAnchor. Is there any way to rotate the camera to the disired point?
so what I am trying to do, is to change the OVRCameraRig's position and rotate the CenterEyeAnchor afterwards, so it is facing the point it was looking at before the position change.
This worked for a normal camera but somehow it doesn't work for the CenterEyeAnchor. Is there any way to rotate the camera to the disired point?
RaycastHit hit;
var ray = centerEyeAnchor.ScreenPointToRay(new Vector3(Screen.width / 2, Screen.height / 2, 0));
if (Physics.Raycast(ray, out hit))
{
var point = hit.point;
transform.position = Position;
centerEyeAnchor.transform.LookAt(point);
}Replies have been turned off for this discussion
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 years agoAnonymous
- 8 years ago
- 8 months ago
- 2 years ago