I want to go about In making a camera system but on different devices the camera FOV Is larger or smaller depending on its size if anyone has any tips That would be greatly appreciated! Thank you for reading
1 Like
You can use Camera.ViewportSize
for this.
Example script:
local size = workspace.CurrentCamera.ViewportSize
if size.X >= 500 then
workspace.CurrentCamera.FieldOfView = 70
elseif size.X >= 1000 then
workspace.CurrentCamera.FieldOfView = 85
elseif size.X >= 1500 then
workspace.CurrentCamera.FieldOfView = 100
else
workspace.CurrentCamera.FieldOfView = 115
end
Hope this helps,
Fizzitix
1 Like
Set your Camera’s FieldOfViewMode to Diagonal. This will effectively automatically adjust the field of view to maintain a specific field of view. Adjust the Camera’s DiagonalFieldOfView
once you do this, as FieldOfView
will be adjusted to maintain the DiagonalFieldOfView
.
Try it out in Studio by resizing the viewport, or looking at the game at different resolutions using the Device Emulator.
2 Likes
Sorry for the late response but could specify exactly How I can adjust the Diagonal FOV I tried and It Didn’t change anything.
1 Like