-
Notifications
You must be signed in to change notification settings - Fork 16
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
Sprite rotation #16
Comments
We did exactly this (the XNA way) for the |
For reference: https://github.com/cloudhead/rgx/pull/10 |
@cloudhead You can assign me to this, gonna need it anyway. |
@xla, in case something goes wrong, I am ready to try to do it as well. Will be keeping my eye on the progress here 😉 |
I have some changes I can post as an early draft for the pull request. The new code supports full matrix transformations for sprites (rotation and scaling with origin). However, there are a couple of downsides, at the moment:
I think those issues can be resolved pretty quickly with some cooperation, providing RGX with some kind of proper sprite transform support. Looking forward to it! |
Amazing! Looking forward to seeing these changes. |
Ok, in this case I will post a pull request as soon as the single sprite rotation transform example code works out as expected! |
@cloudhead, posted a draft pull request. This is my first pull request on GitHub, so sorry if something is done incorrectly! Waiting for feedback! |
Are there any plans to introduce an ability to rotate sprites added to the sprite batch?
In theory, it should be pretty easily done by introducing something like
RotationRect
as an extension ofRect
, which will contain additional info about the angle and origin of rotation. Later thisRotationRect
may be used by callingbatch.add_rotated
.As an alternative, it might be a good solution to go "XNA" way by adding both angle and origin to the direct
batch.add
call.The text was updated successfully, but these errors were encountered: