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

[4.0 beta10] Skeleton2D/Polygon2D moving/rotating issues when polygon is not on default position #71108

Closed
nachomozo opened this issue Jan 9, 2023 · 2 comments · Fixed by #72214

Comments

@nachomozo
Copy link

Godot version

4.0.beta10.official

System information

Pop!_OS 22.04

Issue description

After assigning a bone to a polygon, if the bone is not at the initial position (0,0), a strange behavior occurs when moving or rotating the bones.

The polygon is translated to incorrect positions (it seems to be based on the center of the original texture and not the polygon itself.

godot4-09-01-2023 13-32

Trying the exactly same nodes on v3.5.1 behaves correctly.

godot3-09-01-2023 13-22

There are a similar closed issue for Godot 3:
#48348

Steps to reproduce

  1. Add a Polygon2D node to the root
  2. Assign a texture to the Polygon2D and edit the polygon UV to cut the desired part
  3. Move it to a new position
  4. Add a Skeleton2D node to the root
  5. Add a Bone2D node to the Skeleton2D
  6. Assign the Bone2D to the Polygon2D and proper weight to de polygon UV
  7. Rotate or move the Bone2D

Minimal reproduction project

godot4_bones2d_issue.zip

@nachomozo nachomozo changed the title Skeleton2D/Polygon2D moving/rotating issues when polygon is not on default position [4.0 beta10] Skeleton2D/Polygon2D moving/rotating issues when polygon is not on default position Jan 9, 2023
@JeanKouss
Copy link

I have the problem.
System information
Windows 10

@clayjohn
Copy link
Member

Right now to have rotations work correctly you need to set the polygon's pivot to be the origin (i.e. 0,0). This was not the case in 3.x, but due to how bones work in 4.0, it may be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants