fix rotation order of operations

This commit is contained in:
2022-08-12 23:51:17 +00:00
parent 39d3007e1d
commit fdd7d085da

View File

@@ -30,10 +30,10 @@ class KissExtendedSprite extends flixel.addons.display.FlxExtendedSprite {
if (deg < 0) {
deg += 360 * Math.ceil(Math.abs(deg / 360));
}
angle = angle + deg % 360;
angle = (angle + deg) % 360;
for (c in connectedSprites) {
if (c != this) {
c.angle = c.angle + deg % 360;
c.angle = (c.angle + deg) % 360;
var thisCenter = new FlxPoint(x + origin.x, y + origin.y);
var cCenter = new FlxPoint(c.x + c.origin.x, c.y + c.origin.y);