From e11cd56bac53c315a0927c9fd35f5a396f65a198 Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Thu, 1 Dec 2016 14:36:47 +0100 Subject: [PATCH] Fixed point attachment world rotation. --- .../spine/attachments/PointAttachment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/PointAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/PointAttachment.java index 2e46885c9..a17c909d3 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/PointAttachment.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/PointAttachment.java @@ -87,9 +87,9 @@ public class PointAttachment extends Attachment { } public float computeWorldRotation (Bone bone) { - float x = cos(rotation), y = sin(rotation); - x = x * bone.getA() + y * bone.getB() + bone.getWorldX(); - y = x * bone.getC() + y * bone.getD() + bone.getWorldY(); - return (float)Math.atan2(y, x); + float cos = cosDeg(rotation), sin = sinDeg(rotation); + float x = cos * bone.getA() + sin * bone.getB(); + float y = cos * bone.getC() + sin * bone.getD(); + return (float)Math.atan2(y, x) * radDeg; } }