summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-05-07 21:16:21 +0200
committerGitHub <noreply@github.com>2020-05-07 21:16:21 +0200
commitbef52957d00c50323824e4fa0a778453214721cf (patch)
tree91890b7d5ffe2d22f4b81220902988eb58356cf3
parentbd75e2538b659034ca82b331d2684ca87ef52fe3 (diff)
parentccc4f3899c299f39ad549236cdafc5bd954e0080 (diff)
Merge pull request #38226 from Calinou/increase-camera3d-fov
Increase the default Camera3D field of view to 75
-rw-r--r--doc/classes/Camera3D.xml7
-rw-r--r--scene/3d/camera_3d.cpp2
-rw-r--r--servers/rendering/rendering_server_scene.h2
3 files changed, 8 insertions, 3 deletions
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index bfba23c7ee..6ff4875364 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -183,8 +183,13 @@
<member name="far" type="float" setter="set_zfar" getter="get_zfar" default="100.0">
The distance to the far culling boundary for this camera relative to its local Z axis.
</member>
- <member name="fov" type="float" setter="set_fov" getter="get_fov" default="70.0">
+ <member name="fov" type="float" setter="set_fov" getter="get_fov" default="75.0">
The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle.
+ For reference, the default vertical field of view value ([code]75.0[/code]) is equivalent to an horizontal FOV of:
+ - ~91.31 degrees in a 4:3 viewport
+ - ~101.67 degrees in a 16:10 viewport
+ - ~107.51 degrees in a 16:9 viewport
+ - ~121.63 degrees in a 21:9 viewport
</member>
<member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2( 0, 0 )">
The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url].
diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp
index 2fcb2715be..871f3119bc 100644
--- a/scene/3d/camera_3d.cpp
+++ b/scene/3d/camera_3d.cpp
@@ -689,7 +689,7 @@ Camera3D::Camera3D() {
viewport = nullptr;
force_change = false;
mode = PROJECTION_PERSPECTIVE;
- set_perspective(70.0, 0.05, 100.0);
+ set_perspective(75.0, 0.05, 100.0);
keep_aspect = KEEP_HEIGHT;
layers = 0xfffff;
v_offset = 0;
diff --git a/servers/rendering/rendering_server_scene.h b/servers/rendering/rendering_server_scene.h
index db2fbd6707..eb66cea3aa 100644
--- a/servers/rendering/rendering_server_scene.h
+++ b/servers/rendering/rendering_server_scene.h
@@ -82,7 +82,7 @@ public:
Camera() {
visible_layers = 0xFFFFFFFF;
- fov = 70;
+ fov = 75;
type = PERSPECTIVE;
znear = 0.05;
zfar = 100;