woah, that's awesome. How you do that destroyed object crumble into pieces like that in Godot?
Very cool and fun Game.
Thank you. Everything destructible is a polygon with a texture. On collision, the mass, velocity, and damage upgrade coefficient subdivide the destructible object (using Delaunay triangulation to produce triangles) and updates the polygon (triangles not visible yet). A fracture function then determines the size of the cut shape (the chunk that will break off, also based on mass, velocity, and damage). This chunk is spawned, shattered (with triangles flying away), and subtracted from the “old” polygon.
I found a library to handle all the math and helper functions for polygons like calculateArea, Delaunay triangulation and getRandomPointsInPolygon. (its in the credits)
It would have taken me months to understand all the math behind the fracturing myself. :D