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

Camera projection default viewport missmatch #2628

Open
mtszkarbowiak opened this issue May 20, 2024 · 0 comments
Open

Camera projection default viewport missmatch #2628

mtszkarbowiak opened this issue May 20, 2024 · 0 comments
Labels
bug Something isn't working ui
Milestone

Comments

@mtszkarbowiak
Copy link
Contributor

Issue description:

Default camera projection viewport does not align with the main viewport.

Example:

The following code does not work:

Camera.ProjectPoint(Target.Position, out origin);
origin += ScreenOffset;

But this code works (Assuming the control takes space of the entire viewport):

var viewport = Camera.Viewport;
viewport.Size = Control.Size; // Override the size
Camera.ProjectPoint(Target.Position, out origin, ref viewport);
origin += ScreenOffset;

Flax version:

1.7, 1.8, master

@mafiesto4 mafiesto4 added bug Something isn't working ui labels May 22, 2024
@mafiesto4 mafiesto4 added this to the 1.9 milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui
Projects
None yet
Development

No branches or pull requests

2 participants