I’m using the SteamVR plugin, and I’ve been looking through its scripts trying to find what actually moves the in-game camera when the HMD moves. As in, if this script was disabled, the camera in-game wouldn’t move at all when I moved the HMD. I haven’t been able to find a script that does this in the Assets>SteamVR>Scripts folder. Where is the script responsible for this, and what is it named?
Since Unity 5.4, movement of the camera is done natively by Unity itself, not the SteamVR asset.
Thanks! Is there any way to configure unity’s camera movement?
The actual camera node itself, I don’t think so. But you can parent the camera under another transform and move that.
Hey, I tried parenting the camera to a cube, but was still able to look around inside the HMD. Any other ideas?
Correct. This just allows you to offset the camera, for example if you wanted to put the person in a moving car.
As far as I know there is no option to control the local transform of the camera and I don’t think there should be one. It sounds like you want to either disable the tracking of the headset or manually control the camera, but this would create a very unpleasant experience for the user.
This is for research purposes – not an actual game – so that is exactly the kind of stuff I want to break and tweak.
You would have to look through the SteamVR SDK to see if there is some sort of command to disable it. For example I know in the Oculus SDK you can turn off positional tracking, but I’ve never seen anything to disable rotation.
Take a look at XRDevice.DisableAutoXRCameraTracking(_camera, true);
This stops the camera moving and rotating, letting you set the locations manually.
Did you ever find a way to do this?