mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[libgdx] Fixed path constraint when a parent bone of the path is scaled.
closes EsotericSoftware/spine-editor#499
This commit is contained in:
parent
10d5a918ca
commit
e14db0ec2c
@ -346,10 +346,7 @@ public class PathConstraint implements Updatable {
|
|||||||
y1 = y2;
|
y1 = y2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.positionMode == PositionMode.percent)
|
if (data.positionMode == PositionMode.percent) position *= pathLength;
|
||||||
position *= pathLength;
|
|
||||||
else
|
|
||||||
position *= pathLength / path.getLengths()[curveCount - 1];
|
|
||||||
|
|
||||||
float multiplier;
|
float multiplier;
|
||||||
switch (data.spacingMode) {
|
switch (data.spacingMode) {
|
||||||
|
|||||||
@ -58,8 +58,8 @@ public class PathAttachment extends VertexAttachment {
|
|||||||
this.closed = closed;
|
this.closed = closed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
/** If true, additional calculations are performed to make computing positions along the path more accurate and movement along
|
||||||
* calculations are performed but calculating positions along the path is less accurate. */
|
* the path have a constant speed. */
|
||||||
public boolean getConstantSpeed () {
|
public boolean getConstantSpeed () {
|
||||||
return constantSpeed;
|
return constantSpeed;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user