Skip to content

Commit ca2d30d

Browse files
Use a more accurate segment multiplier
1 parent 0fff39f commit ca2d30d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/Scripts/DrawCircle.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private static Mesh CircleMesh(Vector2 v0, Vector2 v1, Color fillColor)
9292
// The number of segments can be increased based on the radius so that large circles also appear curved.
9393
// We use an offset and multiplier to create a tunable linear function.
9494
const float segmentOffset = 40f;
95-
const float segmentMultiplier = 5f;
95+
const float segmentMultiplier = 2 * Mathf.PI;
9696
var numSegments = (int) (radius * segmentMultiplier + segmentOffset);
9797

9898
// Create an array of points arround a cricle
@@ -122,4 +122,4 @@ private static Mesh CircleMesh(Vector2 v0, Vector2 v1, Color fillColor)
122122

123123
return mesh;
124124
}
125-
}
125+
}

0 commit comments

Comments
 (0)