Skip to content

Commit 5483a5d

Browse files
committed
fixed a RegularPolygonMesh bug
1 parent 244c2f8 commit 5483a5d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Assets/Scripts/Core/Mesh/RegularPolygonMesh.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ public void OnPopulateMesh(VertexBuffer vb)
6464
Rect rect = drawRect != null ? (Rect)drawRect : vb.contentRect;
6565
Color32 color = fillColor != null ? (Color32)fillColor : vb.vertexColor;
6666

67-
rotation = rotation * Mathf.Deg2Rad;
6867
float angleDelta = 2 * Mathf.PI / sides;
69-
float angle = rotation;
68+
float angle = rotation * Mathf.Deg2Rad;
7069
float radius = Mathf.Min(rect.width / 2, rect.height / 2);
7170

7271
float centerX = radius + rect.x;

0 commit comments

Comments
 (0)