mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 06:44:56 +08:00
PathConstraint needs to take into account flipX/Y or parent scale. Determining handedness of base vectors let's us compensate
This commit is contained in:
parent
208f797648
commit
f5a6b4bf92
@ -149,7 +149,8 @@ public class PathConstraint implements Constraint {
|
||||
r = positions[p + 2];
|
||||
else
|
||||
r = atan2(dy, dx);
|
||||
r -= atan2(c, a) - offsetRotation * degRad;
|
||||
float det = a * d - b * c;
|
||||
r -= atan2(c, a) + (det > 0 ? -offsetRotation * degRad : offsetRotation * degRad);
|
||||
if (tip) {
|
||||
cos = cos(r);
|
||||
sin = sin(r);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user