How to prevent changing camera position and fov in play mode?

Hello

I have a VR scene and It’s played well in Windows Mixed Reality environment, but I’m in trouble with camera position.

When i’m in play mode, Main camera’s position (y and z) and Field of view values is changed.
You can see the changes in attached picture.

Before play mode
4492945--414142--Before Play.PNG

In play mode
4492945--414139--After Play.PNG

y position changed 0 to 1.65
z position changed 0 to 0.0985
fov changed 60 to 105

And a next log popped up in Console
“Windows Mixed Reality spatial locatability state changed to Active.”

My main camera prefab is from VR Samples of Unity technologies. This problem don’t occur in standalone build with oculus, android build with cardboard.

How can i prevent this changes?

Thanks.

I believe the behavior you’re seeing is by design. We do this move because we are essentially moving the world to your head’s position for things like the user’s physical height and stuff. This will place the floor where it’s supposed to be and all that.

The workaround, if you really want your camera to stay exactly where you put it is to attach your camera as a child to a game object like an empty game object which does the trick. If you’re still having issues, let me know but I think you’re experiencing ‘by design’ behavior from what I understand of your description.

2 Likes

Thanks for your reply!

I understand the behavior is by design. And i will try trick you mentioned.

But, Is there any options to disable or adjust it?

1 Like

I believe the only way to adjust it would be in the Windows Mixed Reality Portal, there should be a setting to control the player’s height.

1 Like