fix: Algorithm Error
This commit is contained in:
parent
0649494f9c
commit
6dbd2b1407
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue