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

Enhancement: world space camera rotation #3116

Open
2 tasks done
cyn0x8 opened this issue Aug 22, 2024 · 0 comments
Open
2 tasks done

Enhancement: world space camera rotation #3116

cyn0x8 opened this issue Aug 22, 2024 · 0 comments
Labels
status: pending triage The bug or PR has not been reviewed yet. type: enhancement Provides an enhancement or new feature.

Comments

@cyn0x8
Copy link
Contributor

cyn0x8 commented Aug 22, 2024

Issue Checklist

  • I have properly named the enhancement
  • I have checked the issues/discussions pages to see if the enhancement has been previously suggested

What is your suggestion, and why should it be implemented?

requesting a merge for this pr!!

currently, FlxCamera allows for itself to be moved with x and y and its world space moved with scroll, scaled with setScale and its world space scaled with zoom, rotated with angle... but no equivalent for the world space!
when rotating a camera the size of the screen, we are stuck with ugly clipping at the corners or the screen

an alternative would be to scale the camera frame by its diagonal and then use a shader for rotation (rotating the camera completely breaks shaders), but this is extremely expensive...

this pr adds a rotation property to cameras which allow you to rotate the world space (video example in the pr)
if any improvements could be made, math that needs to be changed, or otherwise any bugs found, please make them known in the pr instead of here; this issue is just to bring attention to it

@cyn0x8 cyn0x8 added status: pending triage The bug or PR has not been reviewed yet. type: enhancement Provides an enhancement or new feature. labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pending triage The bug or PR has not been reviewed yet. type: enhancement Provides an enhancement or new feature.
Projects
None yet
Development

No branches or pull requests

1 participant