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

Rearranging bones in the skeleton2d causes polygon2d to disappear #74132

Closed
ghost opened this issue Feb 28, 2023 · 9 comments · Fixed by #84451
Closed

Rearranging bones in the skeleton2d causes polygon2d to disappear #74132

ghost opened this issue Feb 28, 2023 · 9 comments · Fixed by #84451

Comments

@ghost
Copy link

ghost commented Feb 28, 2023

Godot version

4 rc6

System information

win 11

Issue description

I made neck a check of torso instead of cervix and all the sprites for the neck and its children (head, etc) disappeared. I dunno how to get them back.

Steps to reproduce

Make a polygon
make a skeleton with bones
assign the skeleton to the polygon and paint the weights
move the bones

Minimal reproduction project

n/a

edit: okay i got them back by repainting the weights but now the uv thingy is off

image

@jasonmccollum
Copy link

I've ran into the same issue in 4.0 on Windows 10. While animating the bones, the texture of one of my Polygon2D nodes disappeared. The editor showed the bones were still painted correctly, but the when I hit "Sync Bones to Polygon" the weights disappeared. Painting again brought the texture back.

@dippinpahwa
Copy link

similar issue, I am using v4.0.1 on windows 11. The texture disappears on polygon2D while painting weights on the bones.

@dippinpahwa
Copy link

i found a simple fix, overwrite rest pose for skeleton2D node from the navigator menu.

@rretureau
Copy link

Bump. Tested from RC6 to Beta 4.1. Issue is still there. Repainting weight doesn't work and is not a solution (when you have a big UV).

It happens in the editor and when you run the project.

bug

Steps to reproduce

  • Add Polygon2D with UV and sync it to a bone from a Skeleton2D.
  • Rotate the bone or scale the view

@Xorblax
Copy link

Xorblax commented Jun 29, 2023

I had what I believe to be the same problem. It's because the pivot for the polygon2D is far away, so when the polygon rotates around its bone, it occludes as if its rotating around its pivot, which would put it off screen. The solution was changing the rotation pivot for each polygon and putting them at or close to origin.
An option to reset pivot to origin or object center without affecting the global position of the object would be very useful here.

@Xorblax
Copy link

Xorblax commented Jun 29, 2023

Although now I am dealing with a new problem where some of the polygons, not all, will disappear if the rig travels too far from origin. Good ol godot
EDIT: Found fix for this. A skeleton based rigidbody ragdoll will not move the main root transform of a scene with it. This root transform is what the polygons use to determine if they're occluded or not. Any attempt to adjust the polygon's offset or transform messes them up, so what I do is set the position of the scene root node equal to that of the rigidbody ragdoll root, then set that ragdoll root's position to 0.

@hsandt
Copy link
Contributor

hsandt commented Jul 21, 2023

Great, I studied on my side and found the same conclusion.

@ShatReal (or a moderator) now that we've reproduced things more accurately, could you edit the title to something like "When polygon points are far from root, rotating them via Skeleton2D bones with painted weights causes them to disappear above certain angles" ?

@PixelWeaver
Copy link

i found a simple fix, overwrite rest pose for skeleton2D node from the navigator menu.

Same problem!
& Thank you so much this worked for me, even though this is so damn hackish.

@JamesKaret
Copy link

JamesKaret commented Sep 27, 2023

I found another way to fix this issue.
I'm pretty sure you'd moved Polygon2D nodes to somewhere you want.
DO NOT USE TRANSFORM.
Reset transform and use offset of Polygon2D, instead.

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

Successfully merging a pull request may close this issue.

9 participants