fix: Algorithm Error

This commit is contained in:
Syntriax 2023-12-04 12:32:28 +03:00
parent 0649494f9c
commit 6dbd2b1407
1 changed files with 5 additions and 5 deletions

View File

@ -43,16 +43,16 @@ public class Collider2DBehaviour(IList<Vector2> vertices) : BehaviourOverride, I
{
triangles.Clear();
Triangle superTriangle = GetSuperTriangle(Vertices);
_vertices.Clear();
foreach (var vertex in VerticesOriginal)
_vertices.Add(vertex + Transform.Position);
Triangle superTriangle = GetSuperTriangle(_vertices);
triangles.Add(superTriangle);
List<Triangle> badTriangles = new(32);
List<Edge> polygon = new(32);
_vertices.Clear();
foreach (var vertex in VerticesOriginal)
_vertices.Add(vertex + Transform.Position);
foreach (var vertex in _vertices)
{
badTriangles.Clear();