You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Skeleton2D and Bone2D to animate Polygon2D can lead to the Polygon2D no longer being shown, probably being culled, when it is actually still supposed to be on the screen.
Minimum project, everything is shown:
Zooming in a little makes the lower leg and foot getting culled
Rotating the hips Bone node also makes all the leg nodes getting culled.
This was also an issue in Godot 3 that then luckily got fixed: #35726
It has the same behavior so a similar solution might solve the problem in 4 as well?
Steps to reproduce
Add some Polygon2D nodes, attach a texture to them and use UV points to put it on screen. Add a Skeleton2D with some bone2Ds. Connect the UV of the Polygon2D to the bones
This has been set up in minima project.
Now move the bones around a bit, move the root node around on the screen so it gets to the edge. You will see the Polygon2D's getting culled before they are off the screen.
BTW I did the fix in 3.x (#75612), and did spend some time trying a similar fix in 4.x, but this area has diverged significantly between the two versions. The reason for the bug is similar but the fix would need to be tailored for 4.x, and would need more time invested.
The old workaround (using the new Class names) still works once the game is running:
func enlarge_all_visual_rects(): var custom_rect = Rect2(Vector2.ZERO, Vector2(1500,1500)) for polygon in _node_under_which_your_polygons_are.get_children(): print("check: " + polygon.name) RenderingServer.canvas_item_set_custom_rect(polygon.get_canvas_item(), true, custom_rect)
However, this does not work in the editor, unless you use "@tool" to load/run your scene in the editor, but that's not ideal when you're dealing with characters subject to gravity for instance.
Is this impacted by the new SkeletonModificationStack perchance?
Godot version
4.1.1.stable
System information
Windows 10
Issue description
Using Skeleton2D and Bone2D to animate Polygon2D can lead to the Polygon2D no longer being shown, probably being culled, when it is actually still supposed to be on the screen.
Minimum project, everything is shown:
Zooming in a little makes the lower leg and foot getting culled
Rotating the hips Bone node also makes all the leg nodes getting culled.
This was also an issue in Godot 3 that then luckily got fixed: #35726
It has the same behavior so a similar solution might solve the problem in 4 as well?
Steps to reproduce
Add some Polygon2D nodes, attach a texture to them and use UV points to put it on screen. Add a Skeleton2D with some bone2Ds. Connect the UV of the Polygon2D to the bones
This has been set up in minima project.
Now move the bones around a bit, move the root node around on the screen so it gets to the edge. You will see the Polygon2D's getting culled before they are off the screen.
Minimal reproduction project
MinimumCulling.zip
The text was updated successfully, but these errors were encountered: