[csharp] Port of commit e78095e: Gravity takes yDown in consideration.

This commit is contained in:
Harald Csaszar 2024-03-29 16:54:46 +01:00
parent 79db4fc912
commit 36a1a1742b
2 changed files with 3 additions and 3 deletions

View File

@ -170,7 +170,7 @@ namespace Spine {
uy = by;
}
if (a >= t) {
float m = massInverse * t, e = strength, w = wind * f, g = gravity * f;
float m = massInverse * t, e = strength, w = wind * f, g = (Bone.yDown ? -gravity : gravity) * f;
float d = (float)Math.Pow(damping, 60 * t);
do {
if (x) {
@ -219,7 +219,7 @@ namespace Spine {
}
a = this.remaining;
if (a >= t) {
float m = massInverse * t, e = strength, w = wind, g = gravity;
float m = massInverse * t, e = strength, w = wind, g = (Bone.yDown ? -gravity : gravity);
float d = (float)Math.Pow(damping, 60 * t), h = l / f;
while (true) {
a -= t;

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.spine-csharp",
"displayName": "spine-csharp Runtime",
"description": "This plugin provides the spine-csharp core runtime.",
"version": "4.2.18",
"version": "4.2.19",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",