1234567public Vector3 RandomPointOnCircle(float radius){ float u = Random.Range(0f, 1f); float theta = u * (Mathf.PI * 2f); return new Vector3(radius * Mathf.Cos(theta), radius * Mathf.Sin(theta), 0f);}Colored by Color Scriptercs
123456789public Vector3 RandomPointInsideCircle(float radius){ float u = Random.Range(0f, 1f); float theta = u * (Mathf.PI * 2f); float sqrt = Mathf.Sqrt(Random.Range(0f, 1f)); radius *= sqrt; return new Vector3(radius * Mathf.Cos(theta), radius * Mathf.Sin(theta), 0f);}Colored by Color Scriptercs