mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-15 03:21:35 +08:00
[unity] Physics Transform position changes: Fixed Z instead of Y axis affecting vertical translation (see commit 09e1436).
This commit is contained in:
parent
11b339bd67
commit
900e92ba46
@ -244,10 +244,10 @@ namespace Spine.Unity {
|
||||
skeleton.Update(deltaTime);
|
||||
|
||||
if (Application.isPlaying) {
|
||||
Vector2 position = new Vector2(transform.position.x, transform.position.z);
|
||||
Vector2 position = new Vector2(transform.position.x, transform.position.y);
|
||||
Vector2 positionDelta = position - lastPosition;
|
||||
positionDelta.x /= transform.lossyScale.x;
|
||||
positionDelta.y /= transform.lossyScale.z;
|
||||
positionDelta.y /= transform.lossyScale.y;
|
||||
skeleton.PhysicsTranslate(positionDelta.x, positionDelta.y);
|
||||
lastPosition = position;
|
||||
}
|
||||
|
||||
@ -382,10 +382,10 @@ namespace Spine.Unity {
|
||||
skeleton.Update(deltaTime);
|
||||
|
||||
if (Application.isPlaying) {
|
||||
Vector2 position = new Vector2(transform.position.x, transform.position.z);
|
||||
Vector2 position = new Vector2(transform.position.x, transform.position.y);
|
||||
Vector2 positionDelta = (position - lastPosition) / meshScale;
|
||||
positionDelta.x /= transform.lossyScale.x;
|
||||
positionDelta.y /= transform.lossyScale.z;
|
||||
positionDelta.y /= transform.lossyScale.y;
|
||||
skeleton.PhysicsTranslate(positionDelta.x, positionDelta.y);
|
||||
lastPosition = position;
|
||||
}
|
||||
|
||||
@ -127,10 +127,10 @@ namespace Spine.Unity {
|
||||
skeleton.Update(deltaTime);
|
||||
|
||||
if (Application.isPlaying) {
|
||||
Vector2 position = new Vector2(transform.position.x, transform.position.z);
|
||||
Vector2 position = new Vector2(transform.position.x, transform.position.y);
|
||||
Vector2 positionDelta = position - lastPosition;
|
||||
positionDelta.x /= transform.lossyScale.x;
|
||||
positionDelta.y /= transform.lossyScale.z;
|
||||
positionDelta.y /= transform.lossyScale.y;
|
||||
skeleton.PhysicsTranslate(positionDelta.x, positionDelta.y);
|
||||
lastPosition = position;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "com.esotericsoftware.spine.spine-unity",
|
||||
"displayName": "spine-unity Runtime",
|
||||
"description": "This plugin provides the spine-unity runtime core.",
|
||||
"version": "4.2.42",
|
||||
"version": "4.2.43",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user