Alternative to BitMap.opaque_to_polygons? How to generate StaticBody2Ds from a Bitmap

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SteveSmith

I’m having a lot of trouble with the function BitMap.opaque_to_polygons() which should generate a list of polygons from a bitmap. However, it can sometimes error with “Convex decomposing failed” or simply miss out large sections of the Bitmap if there are certain pixel configurations.

Are there any alternatives, or other code to generate pixels (or StaticBody2Ds) from a Bitmap?