Forum Discussion
phileday
9 years agoMHCP Member
changing Field of view on Unity camera.
I know that this is highly not recommended as it causes distortion but I wondered if it was actually even possible any more. I make a video player and it is a request I get quite a lot and who and I to disable the ability to hurt your eyes if you want too :)
4 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffCamera.fieldOfView is currently overwritten by Unity based on the user's actual field of view. If you want to set it to something else, you may be able to do so each frame in the Update function, but the results won't be pretty. A much better approach is to scale the camera or the world.
- ConstellationAdventurerI understand how increasing the FOV could cause serious sim sickness but I'm actually interested in limiting it. I've tried the FOV limiting feature of the Oculus World Demo and it's perfectly comfortable. I need to be able to set the FOV to specific, exact values for testing purposes and I'm guessing that might not be a straightforward thing to do via the camera/world scale.
If anyone has made progress on this I'd love to know if it's possible. - vrdavebOculus StaffOWD's FOV limiting is slightly different from what people have been requesting here: it renders to a smaller FOV and tells the compositor to show the eye buffers in a smaller FOV, which keeps the right relationship between optical flow and head movement. This would need a change inside Unity, so it's hard to give a specific ETA, but we'll take a look. In the meantime, you could get some of the same savings by rendering quads to the z-buffer in OnPreRender to crop out the undesired parts of the view.
- ConstellationAdventurerSince I was looking to take measurements and not block specific parts of the scene I ended up creating a mask out of quads and attaching it to the camera along with a hemisphere with a 0 - 180 ruler texture on it. Adjusting the offset from the camera to the mask allows me to effectively change the FOV and then measure against the ruler. Only tricky bit is that I have to close one eye and measure from 90 in the direction of that eye. Not so elegant and probably not super precise but it got the job done!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 4 years ago
- 1 month ago
- 7 months ago
- 9 months ago