Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[runtimes] Apply skeleton.scaleX/scaleY to wind and gravity #2729

Open
6 tasks
davidetan opened this issue Jan 8, 2025 · 0 comments
Open
6 tasks

[runtimes] Apply skeleton.scaleX/scaleY to wind and gravity #2729

davidetan opened this issue Jan 8, 2025 · 0 comments

Comments

@davidetan
Copy link
Collaborator

PhysicsConstraint are not currently considering skeleton.scaleX and skeleton.scaleY wind and gravity during update.

This line of code should be modified.

From:

float m = massInverse * t, e = strength, w = wind * f, g = gravity * f;

To:

float m = massInverse * t, e = strength, w = wind * f * skeleton.scaleX, g = gravity * f * skeleton.scaleY;

We don't need to do that here.

To test the effectivness of the fix, just run cloud-pot example with rain animation and change skeleton.scaleX and skeleton.scaleY to 0.5.

  • Java
  • C
  • C++
  • C#
  • TypeScript
  • Haxe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant