mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
[c] Closes #2224, incorrect position calculation in path constraint
This commit is contained in:
parent
71d4417ca1
commit
19b1ea703c
@ -286,7 +286,7 @@ float *spPathConstraint_computeWorldPositions(spPathConstraint *self, spPathAtta
|
|||||||
float *lengths = path->lengths;
|
float *lengths = path->lengths;
|
||||||
curveCount -= closed ? 1 : 2;
|
curveCount -= closed ? 1 : 2;
|
||||||
pathLength = lengths[curveCount];
|
pathLength = lengths[curveCount];
|
||||||
if (self->data->positionMode == SP_POSITION_MODE_PERCENT) position += pathLength;
|
if (self->data->positionMode == SP_POSITION_MODE_PERCENT) position *= pathLength;
|
||||||
switch (self->data->spacingMode) {
|
switch (self->data->spacingMode) {
|
||||||
case SP_SPACING_MODE_PERCENT:
|
case SP_SPACING_MODE_PERCENT:
|
||||||
multiplier = pathLength;
|
multiplier = pathLength;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user