-
Notifications
You must be signed in to change notification settings - Fork 125
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
Using the camera with rotation? #124
Comments
Yeah we were talking about this issue in the past , still not solved #26 , see at the buttom of the page other issue related |
@fedkanaut my workarround was to apply trasformation matrices manually , what was yours ? |
I couldn’t get that to play nice for whatever reason (probably me). I didn’t actually really need runtime camera rotation so I just baked it into the polygons I was working with and called it a day (my use case is weird). |
Ensure rotation and scale happen after translation, and from the center of the camera. Fixes grimfang4#133 and grimfang4#124
I know this issue is a bit old, but if you still have the original code I would appreciate if you could try this patch and confirm it works for your use case: #206 |
Hi there,
So, I've been trying to use the camera (in 2d) rotated and I cannot for the life of me get the panning and zooming to work correctly while rotated. The camera zooms in toward somewhere in the lower left instead of the center of the screen. The camera doesn't pan parallel and perpendicular to its edges when using simple operations like cam.x++ and cam.y++, I used some basic trig to compensate for the latter, which worked, but only at one zoom level (8x out, specifically).
I'd chalk this up to my dubious math and programming skills, but the camera test program doesn't seem to compensate at all for the rotation which makes me think something else may be going on here? I'm not sure how to build the tests to make sure (on linux), though. I managed to generate a bunch of cmake files/directories and a feature_tests.bin but nothing that seems to run or can be make install'd
I'd greatly appreciate any pointers or instructions how to build the tests, thanks.
ETA: I figured out a work around for my use case, tips would still be appreciated though.
The text was updated successfully, but these errors were encountered: