Funkin
Funkin copied to clipboard
Enhancement: world space camera rotation
Issue Checklist
- [X] I have properly named the enhancement
- [X] 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