Change FOV on Unity

Bahadır ÇAKAR 21 Reputation points
2022-05-19T10:59:08.027+00:00

Hi there,

I'm changing the FOV of the Camera under MixedRealityPlayspace (For instance, I change it to 80). However, when I play the project the FOV is back to the default view which is 60. How can I change it permanently?

Thank you,

HoloLens Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Seth DU - MSFT 541 Reputation points
    2022-05-20T05:05:55.963+00:00

    Hello, welcome to Microsoft Q&A,

    Changing the FOV is not supported for Mixed Reality, and it only makes sense in immersive devices (VR). HoloLens always shows the actual FOV and position of a player. The Main Camera will be updated by MRTK and the Game windows of Unity always shows the same display of HoloLens.

    It is more reasonable to add a UI or a plate to render the display of 2nd camera as a mini map.

    1. Create a Render Texture, configure the resolution.
    2. Add a quad object, resize and place it properly, select the Render Texture in Mesh Renderer component. Select “EyeTrackingIgnore” layer for this quad (this is created if you implement MRTK)
    3. Create a new camera. Uncheck “EyeTrackingIgnore” in Culling Mask to make sure it won’t mirror itself. Select the Render Texture you just created in “Target Texture”
    4. Feel free to add script to let the 2nd camera follow the main camera, and you may also let the the mini map hover at the corner of the display.

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.