We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7d46e7d + 7e4d635 commit b40e6a5Copy full SHA for b40e6a5
editor/plugins/gizmos/camera_3d_gizmo_plugin.cpp
@@ -180,7 +180,13 @@ void Camera3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
180
181
const float hsize = Math::sin(Math::deg_to_rad(fov));
182
const float depth = -Math::cos(Math::deg_to_rad(fov));
183
- Vector3 side = Vector3(hsize * size_factor.x, 0, depth);
+
184
+ Vector3 side;
185
+ if (camera->get_keep_aspect_mode() == Camera3D::KEEP_WIDTH) {
186
+ side = Vector3(hsize * size_factor.x, 0, depth * size_factor.x);
187
+ } else {
188
+ side = Vector3(hsize * size_factor.x, 0, depth * size_factor.y);
189
+ }
190
Vector3 nside = Vector3(-side.x, side.y, side.z);
191
Vector3 up = Vector3(0, hsize * size_factor.y, 0);
192
0 commit comments