mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed compile error on Unity 2017.1 introduced by preceding commit 4266c72.
This commit is contained in:
parent
ad825305f0
commit
b850ff7715
@ -395,9 +395,11 @@ namespace Spine.Unity {
|
|||||||
Vector2 position = GetPhysicsTransformPosition();
|
Vector2 position = GetPhysicsTransformPosition();
|
||||||
Vector2 positionDelta = (position - lastPosition) / meshScale;
|
Vector2 positionDelta = (position - lastPosition) / meshScale;
|
||||||
if (physicsMovementRelativeTo != null) {
|
if (physicsMovementRelativeTo != null) {
|
||||||
positionDelta *= physicsMovementRelativeTo.lossyScale;
|
positionDelta.x *= physicsMovementRelativeTo.lossyScale.x;
|
||||||
|
positionDelta.y *= physicsMovementRelativeTo.lossyScale.y;
|
||||||
}
|
}
|
||||||
positionDelta /= transform.lossyScale;
|
positionDelta.x /= transform.lossyScale.x;
|
||||||
|
positionDelta.y /= transform.lossyScale.y;
|
||||||
skeleton.PhysicsTranslate(positionDelta.x, positionDelta.y);
|
skeleton.PhysicsTranslate(positionDelta.x, positionDelta.y);
|
||||||
lastPosition = position;
|
lastPosition = position;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -474,9 +474,11 @@ namespace Spine.Unity {
|
|||||||
Vector2 position = GetPhysicsTransformPosition();
|
Vector2 position = GetPhysicsTransformPosition();
|
||||||
Vector2 positionDelta = position - lastPosition;
|
Vector2 positionDelta = position - lastPosition;
|
||||||
if (physicsMovementRelativeTo != null) {
|
if (physicsMovementRelativeTo != null) {
|
||||||
positionDelta *= physicsMovementRelativeTo.lossyScale;
|
positionDelta.x *= physicsMovementRelativeTo.lossyScale.x;
|
||||||
|
positionDelta.y *= physicsMovementRelativeTo.lossyScale.y;
|
||||||
}
|
}
|
||||||
positionDelta /= transform.lossyScale;
|
positionDelta.x /= transform.lossyScale.x;
|
||||||
|
positionDelta.y /= transform.lossyScale.y;
|
||||||
skeleton.PhysicsTranslate(positionDelta.x, positionDelta.y);
|
skeleton.PhysicsTranslate(positionDelta.x, positionDelta.y);
|
||||||
lastPosition = position;
|
lastPosition = position;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user