coffee icon indicating copy to clipboard operation
coffee copied to clipboard

Add rotation support for Quad and Sprite

Open danheuck opened this issue 5 years ago • 2 comments

Added support for rotating individual Quads and Sprites as mentioned in #1. As a side effect, this ended up moving the anchor point for positions to the center of the Sprite/Quad since the Sprites needed to be centered on the origin before they could be rotated. In my opinion, this behavior is often preferable anyway, but I realize it's subjective. I can try to figure out a way to apply the rotation without moving changing the way sprite positioning works if desired, but I'm far from an expert on transformation matrices.

#1 mentioned concerns that adding rotation support would negatively impact performance. I did not add any benchmarks, but anecdotally testing with the particles example did not show any significant difference with or without the change.

danheuck avatar Jun 13 '20 16:06 danheuck

Just added a few more commits that move the anchor point back to the top left corner and revert most of the changes I made to the UI renderers as a consequence of the anchor point moving.

danheuck avatar Jun 15 '20 08:06 danheuck

I would like to see this merged aswell. Most games use this feature.

KimPlaybit avatar Oct 21 '22 10:10 KimPlaybit