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

respect viewport in Camera::screen_to_world #842

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

rileylyman
Copy link
Contributor

I noticed that if you have a custom viewport set on your Camera2D, then screen_to_world does not work correctly because it always assumes the viewport is (0, 0, screen_width(), screen_height()). This change checks if there is a viewport and, if so, uses that instead. Let me know if you want this change; I've just had it in my local copy for a bit now.

@not-fl3
Copy link
Owner

not-fl3 commented Oct 15, 2024

Good catch, thanks for PR!

@not-fl3 not-fl3 merged commit 9ce2f73 into not-fl3:master Oct 15, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants