Open Sussumu opened 8 years ago
I believe the aglorithm was implemented from a page in Real-time Collision Detection (https://www.crcpress.com/Real-Time-Collision-Detection/Ericson/9781558607323). My implementation must be slightly off, breaking on an edge case.
The algorithm is the "Ear Clipping" method.
Thanks! I'll see if I can correct this or implement another algorithm and do a pull request, though I still need to get used with this Github thing.
I was trying to draw a map using filled path but on the Initialize() method I got IndexOutOfRangeException on "_triPrev" variable on for() loop because "count" goes much higher than the array. The map's vectors are not broken since I can still draw its path using Lines. I tried messing with the values but I don't get all the math behind the code.