# \[4.11.1\] Manipulating FOV/Zooming in VR

**URL:** <https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776>\
**Category:** XR Development\
**Tags:** zoom, fov, Post-Processing, unreal-engine, question\
**Created:** [April 28, 2016, 1:47pm UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776 "2016-04-28T13:47:09Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hayaweh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hayaweh](https://forums.unrealengine.com/u/Hayaweh)\
**Post date:** [April 28, 2016, 1:47pm UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/1 "2016-04-28T13:47:09Z")

</div>

Hi guys,

I am currently working on a VR project that requires us to have a “sniper zoom”-like feature.

I tried playing around with the FOV of the camera, but it seems like it’s being overriden by the headset itself. (but it works well when not in VR preview tho… xD)

I’d like to know if anybody had a solution to this problem?

As of now, the only idea I got is to have a post-process scaling up the view. But that seem as very likely to get us some bad quality as well as issues with stereo-rendering.

If you know if that’s possible. Or are 100% sure that’s not even possible, please let me know.

Best,  
Erio

---

<div class="post-metadata">

**Author:** ![JianzhaoFu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JianzhaoFu](https://forums.unrealengine.com/u/JianzhaoFu)\
**Post date:** [August 23, 2016, 9:44am UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/2 "2016-08-23T09:44:38Z")

</div>

Any updates?  
I have the very same problem here.

---

<div class="post-metadata">

**Author:** ![Jarrastafari](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jarrastafari](https://forums.unrealengine.com/u/Jarrastafari)\
**Post date:** [August 23, 2016, 9:52am UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/3 "2016-08-23T09:52:01Z")

</div>

Guidelines really state the importance of not overriding the field of view to a VR HMD, as this can result in simulation sickness. See: [Virtual Reality Best Practices | Unreal Engine (VR and Simulation Sickness)](https://docs.unrealengine.com/latest/INT/Platforms/VR/ContentSetup/index.html#vrandsimulationsickness)

Perhaps this might help you come up with a different solution. [The Nest (Sniper VR)](https://www.youtube.com/watch?v=zXzSyvfNswY)

---

<div class="post-metadata">

**Author:** ![Hayaweh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hayaweh](https://forums.unrealengine.com/u/Hayaweh)\
**Post date:** [August 23, 2016, 10:07am UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/4 "2016-08-23T10:07:30Z")

</div>

I just sort of gave up on this method. Ending up having a display with a render target doing the zoom in. Works ok.

---

<div class="post-metadata">

**Author:** ![Hayaweh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hayaweh](https://forums.unrealengine.com/u/Hayaweh)\
**Post date:** [August 23, 2016, 10:13am UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/5 "2016-08-23T10:13:21Z")

</div>

I understand this. But if we take a proper look at how things work in real life…  
If you take the example of using a sniper scope, it will effectively use lenses to narrow your field of view.  
I don’t think that altering the field of view is an issue in itself if it is used properly.

I’ve red those reference and although I can understand the concerns since all developers that want to do VR does not understand how to do proper VR without making people sick.

I’m still a bit disappointed by this lack of control that would be required.

We found a “solution” for now, although expensive and giving an effect different to what we did want using render targets and “display screens”.

I will take a look at what you sent regarding The Nest as it could prove interesting and might used a different technique that could help me in the future if I have to do this kind of things again.

Thanks.

---

<div class="post-metadata">

**Author:** ![Hayaweh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hayaweh](https://forums.unrealengine.com/u/Hayaweh)\
**Post date:** [August 23, 2016, 10:15am UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/6 "2016-08-23T10:15:54Z")

</div>

After watching the video, it seems like they are using something similar as what we ended up doing. So I guess that for now it’s the only solution.  
It works well for their purpose but is way less in line with our. 😛

---

<div class="post-metadata">

**Author:** ![Hayaweh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hayaweh](https://forums.unrealengine.com/u/Hayaweh)\
**Post date:** [August 23, 2016, 10:18am UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/7 "2016-08-23T10:18:10Z")

</div>

So, so far the only way we found to do this has been to use a Render Target on a material (UMG widget/Texture on a plan) and have this render capture do the zoom in.

Not really what we hoped for but for any kind of Zoom things, seems like it’s the only way to go around it currently in VR.

I’m leaving this quite simple, if you understand what’s meant here, then great, otherwise add a comment and I will try to help a bit more. 🙂

---

<div class="post-metadata">

**Author:** ![JianzhaoFu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JianzhaoFu](https://forums.unrealengine.com/u/JianzhaoFu)\
**Post date:** [August 24, 2016, 2:38am UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/8 "2016-08-24T02:38:50Z")

</div>

Thanks a lot.  
Plan to use render target too.  
Will post a update after I implemented this.

---

<div class="post-metadata">

**Author:** ![wongfei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wongfei](https://forums.unrealengine.com/u/wongfei)\
**Post date:** [July 25, 2019, 3:19pm UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/9 "2019-07-25T15:19:24Z")

</div>

Long time passed, but… How do you inject the render target texture into VR view?

---

<div class="post-metadata">

**Author:** ![Hayaweh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hayaweh](https://forums.unrealengine.com/u/Hayaweh)\
**Post date:** [July 25, 2019, 4:26pm UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/10 "2019-07-25T16:26:20Z")

</div>

Basically, you create a material and use that render target as a texture in it. Then you place that material on a plane or any mesh that fits your purpose and place it in the world (attached to the headset or any object where you want it to be displayed). From memory at least that’s the gist of how it should work.

Good luck!

---

<div class="post-metadata">

**Author:** ![wongfei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wongfei](https://forums.unrealengine.com/u/wongfei)\
**Post date:** [July 25, 2019, 4:59pm UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/11 "2019-07-25T16:59:26Z")

</div>

Thanks, already got it working using stereo layer.

---

<div class="post-metadata">

**Author:** ![kevinraz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kevinraz](https://forums.unrealengine.com/u/kevinraz)\
**Post date:** [August 8, 2020, 10:23pm UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/12 "2020-08-08T22:23:37Z")

</div>

I would like to bring this issue back. I have been looking for a solution for this as well. If used properly this does not have any negative effects to the user. Please, lets focus on finding a solution to where this can be implemented and tested, rather than arguing about if it should be done.

**Primary Question:**  
**Where/how can we implement zoom in VR using the main camera (no render targets)?**

I have found by modifying the SteamVRHMD class I can scale the planes rendered in the stereo projection matrix.

The problem with this, is that is messes with the distortion needed to render VR properly as it is scaling the image AFTER the distortion is applied and the scene starts to look a little flat.

I am trying to find a way to zoom/scale or change the FOV earlier in the pipeline. Please, anyone with ideas or knowledge of how to accomplish this, share how this can be done. Thank you!

**What I’ve done:**  
UE 4.24

Engine/Plugins/Runtime/Steam/SteamVR/Source/SteamVR/Private/SteamVRHMD.h:194  
ADD:

```
float MatrixPlaneMultiplier = 2.0f;

```

Engine/Plugins/Runtime/Steam/SteamVR/Source/SteamVR/Private/SteamVRHMD.cpp:1468  
UPDATE TO:

```
FMatrix Mat = FMatrix(
		FPlane((MatrixPlaneMultiplier * InvRL), 0.0f, 0.0f, 0.0f),
		FPlane(0.0f, (MatrixPlaneMultiplier * InvTB), 0.0f, 0.0f),
		FPlane((SumRL * InvRL), (SumTB * InvTB), 0.0f, 1.0f),
		FPlane(0.0f, 0.0f, ZNear, 0.0f)
		);

```

Engine/Plugins/Runtime/Steam/SteamVR/Source/SteamVR/Classes/SteamVRFunctionLibrary.h:70  
ADD:

```
UFUNCTION(BlueprintCallable, Category = "Steam VR Camera")
	static void SetMatrixPlaneMultiplier(float Multiplier);

```

Engine/Plugins/Runtime/Steam/SteamVR/Source/SteamVR/Private/SteamVRFunctionLibrary.cpp:39  
ADD:

```
void USteamVRFunctionLibrary::SetMatrixPlaneMultiplier(float Multiplier)
{
	FSteamVRHMD* SteamVRHMD = GetSteamVRHMD();
	if (SteamVRHMD)
	{
		SteamVRHMD->MatrixPlaneMultiplier = Multiplier;
	}
}

```

Then in BP you can LERP between something like 2 and 8 to get a smooth zoom effect in VR. As mentioned, the issue is the scene starts to look a little flat.

---

<div class="post-metadata">

**Author:** ![skeudo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@skeudo](https://forums.unrealengine.com/u/skeudo)\
**Post date:** [April 20, 2021, 5:02pm UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/13 "2021-04-20T17:02:09Z")

</div>

Any idea for Oculus Quest?

---

<div class="post-metadata">

**Author:** ![OWLANDFOX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OWLANDFOX](https://forums.unrealengine.com/u/OWLANDFOX)\
**Post date:** [February 25, 2022, 5:06pm UTC](https://forums.unrealengine.com/t/4-11-1-manipulating-fov-zooming-in-vr/355776/14 "2022-02-25T17:06:13Z")

</div>

Also looking for an Oculus Quest solution for this.
