0

Win 10 Pro, Unity 2019.2.17f1

This issue occurs on occasion, randomly. It has happened with multiple different scenes on this machine.

In this instance, I have a scene that is completely empty except for the default Main Camera and Directional Light. I have not added any scripts to the scene. In the inspector the camera is at position 0, 10, 0 with rotation 90, 0, 0 by default. Once I hit play, the camera instantly jumps to a seemingly random position and rotation. If I delete the main camera and make a new camera game object, the same thing happens to it. Please see this screen recording demonstrating the problem:

https://youtu.be/JMl2arXzeCo

I'm thinking it might have something to do with the fact that I have SteamVR running on my machine. Does anyone know what causes this, and where I might be able to find a setting to toggle this behavior? Thank you

A__
  • 1,616
  • 2
  • 19
  • 33

2 Answers2

1

In the console you get

OpenVR Initilaized

You seem to have Virtual Reality Support enabled in the ProjectSettings -> Player -> XR Settings thus the camera position and orientation is controlled by a virtual reality device.

From the orientation I would guess that it lies around somewhere ^^

Simply disabling this should fix your issues.

derHugo
  • 83,094
  • 9
  • 75
  • 115
  • Thank you so much! I was unable to uncheck the "Virtual Reality Supported" toggle in the XR Settings panel (when I click it, some loading dialogs periodically appear then nothing is changed), so I followed @eagleeyez's instructions in [this thread](https://forum.unity.com/threads/cannot-turn-off-vr-supported-in-settings.484707/) in order to disable the "Auto Enable VR" setting first. – A__ Jan 28 '20 at 20:08
0

To add to derHugo's answer: to stop the camera from following the VR device without disabling VR support, set the Camera component's Target Eye property to None (Main Display).

A__
  • 1,616
  • 2
  • 19
  • 33