mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[cpp][godot] Closes #2524, physics constraint update didn't take into account yDown properly
This commit is contained in:
parent
4183a58100
commit
ab2de2babd
@ -400,7 +400,7 @@ void PhysicsConstraint::update(Physics physics) {
|
|||||||
a = _remaining;
|
a = _remaining;
|
||||||
if (a >= t) {
|
if (a >= t) {
|
||||||
if (d == -1) d = MathUtil::pow(_damping, 60 * t);
|
if (d == -1) d = MathUtil::pow(_damping, 60 * t);
|
||||||
float m = _massInverse * t, e = _strength, w = _wind, g = _gravity, h = l / f;
|
float m = _massInverse * t, e = _strength, w = _wind, g = _gravity * (Bone::yDown ? -1 : 1), h = l / f;
|
||||||
while (true) {
|
while (true) {
|
||||||
a -= t;
|
a -= t;
|
||||||
if (scaleX) {
|
if (scaleX) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user