mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[ts] Fixed yDown branch of previous commit 89441ca leading to upward gravity. See #2729.
This commit is contained in:
parent
095a5d43e4
commit
2d6c5381e9
@ -163,7 +163,7 @@ export class PhysicsConstraint implements Updatable {
|
|||||||
}
|
}
|
||||||
if (a >= t) {
|
if (a >= t) {
|
||||||
d = Math.pow(this.damping, 60 * t);
|
d = Math.pow(this.damping, 60 * t);
|
||||||
const m = this.massInverse * t, e = this.strength, w = this.wind * f * skeleton.scaleX, g = (Skeleton.yDown ? -this.gravity : this.gravity) * f * skeleton.scaleY;
|
const m = this.massInverse * t, e = this.strength, w = this.wind * f * skeleton.scaleX, g = this.gravity * f * skeleton.scaleY;
|
||||||
do {
|
do {
|
||||||
if (x) {
|
if (x) {
|
||||||
this.xVelocity += (w - this.xOffset * e) * m;
|
this.xVelocity += (w - this.xOffset * e) * m;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user