Closed ZombieCactus closed 4 years ago
@ZombieCactus Hey, sorry for the late response. Yeah, I can reproduce, and I'll investigate. No promises on when I'll get to fix it, but I'll look into it.
I've taken a look at this now, and the issue was that the clipper couldn't handle certain "degenerate" cases with Voronoi diagrams. Specifically, if a Voronoi diagram had a segment that had zero magnitude (i.e. it started and ended at the same point), the clipper would start throwing out NaNs. I've fixed that by skipping over "degenerate" segments when generating the Voronoi diagrams.
@ZombieCactus I can't reproduce the problem anymore, so I'm going to close this issue. If you still have issues, let me know and I can reopen.
Hi. First, great work, I really liked the result and the organization of the code. I am making a game in which an arrow must pierce glass panels, and wanted to use an algorithm for runtime generation. However, in the original version, it was not very visually suitable, and I slightly changed the logic of generating points for splitting. And here I started having problems - some of the polygons stopped drawing, because they have an invalid area. I tried to do a split just spawn points around the center at the same distance and with the same angle. As a result, only 4 of 10 meshes are drawn. I began to explore the algorithm myself, but it will take a lot of time. I would be grateful for the help. Below piece of code that I changed. ` public void Break(Vector2 position) {
... float angleStep = 2.0f * Mathf.PI / 10f;
`