Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frustum of Camera3D does not take into account the window size from ProjectSettings #70362

Open
Tracked by #9
DmitriySalnikov opened this issue Dec 20, 2022 · 3 comments · May be fixed by #70628
Open
Tracked by #9

Frustum of Camera3D does not take into account the window size from ProjectSettings #70362

DmitriySalnikov opened this issue Dec 20, 2022 · 3 comments · May be fixed by #70628

Comments

@DmitriySalnikov
Copy link
Contributor

DmitriySalnikov commented Dec 20, 2022

Godot version

v4.0.beta9.official [e780dc3]

System information

Windows 10, Vulkan

Issue description

For some reason, the frustum of the 3d camera has a square shape before the first opening of the 2d tab. After each opening the 2d tab, the shape is updated based on the viewport size.

Steps to reproduce

Godot_v4 0-beta9_win64_ylU8viGl6H

  • Open / Reopen MRP
  • Note the shape of the frustum
  • Switch to 2D tab and back
  • The shape of the frustum should become normal

Also, before opening the 2d tab, you can change the camera's FOV or Far and Near parameters.

Minimal reproduction project

Camera3D Frustum.zip

@Ayush-singla27
Copy link
Contributor

Ayush-singla27 commented Dec 26, 2022

hey, i am trying to solve this issue but am a bit lost. Does any scaling of camera size take place when we switch 3d to 2d view ?

@DmitriySalnikov
Copy link
Contributor Author

My assumption is that Camera3D uses the parameters of the same viewport that is used in the 2D tab. And while the 2D tab did not open, then its size is equal to the standard 512x512 (square like on GIF).
But I haven't studied this code in more detail🤷‍♂️

@DmitriySalnikov
Copy link
Contributor Author

Here I described the problem in more detail #70628 (comment)

@DmitriySalnikov DmitriySalnikov changed the title Frustum of Camera3D has an incorrect shape before opening the 2D tab Frustum of Camera3D does not use the window size from ProjectSettings Dec 28, 2022
@DmitriySalnikov DmitriySalnikov changed the title Frustum of Camera3D does not use the window size from ProjectSettings Frustum of Camera3D does not take into account the window size from ProjectSettings Dec 28, 2022
@akien-mga akien-mga modified the milestones: 4.0, 4.1 Feb 17, 2023
@akien-mga akien-mga modified the milestones: 4.1, 4.2 Jun 19, 2023
@YuriSizov YuriSizov removed this from the 4.2 milestone Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants