Commit 8b38f54e authored by Nico Mack's avatar Nico Mack

Fixed a bug in getTransform method returning wrong angle if

rotateWithHandle flag is false.
parent 44ab3196
......@@ -273,7 +273,7 @@ public abstract class Corona implements Comparable<Corona>, Cloneable, Touchable
Point drawingPoint = this.getDrawingPoint(asset);
AffineTransform rotation = new AffineTransform();
double handleAngle = (rotateWithHandle) ? drawingPoint.getAngle() : 0;
double handleAngle = (rotateWithHandle) ? drawingPoint.getAngle() : drawingPoint.getAngle() - centre.getAngle();
rotation.rotate(handleAngle, origin.getX(), origin.getY());
rotation.translate(drawingPoint.x, drawingPoint.y);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment