/// <summary> /// Draws regular polygons animation /// </summary> private void Polygons() { int sidesCount = 3 + (int)(sidesCountAmplitude * (sinParam + 1) / 2); Vector3 currentDirection = Quaternion.AngleAxis(doubleSinParam * normalAmplitude, new Vector3(-1, 0, 1).normalized) * Vector3.up; CustomGizmos.DrawRegularPoligon(new Vector3(6, 0, 2) + Vector3.right * sinParam * positionAmplitude, Vector3.right, polygonsRadius, sidesCount, currentDirection); }
/// <summary> /// Draws a rotating circle /// </summary> private void Circle() { Vector3 currentDirection = Quaternion.AngleAxis(currentAngle, new Vector3(-1, 0, 1).normalized) * Vector3.up; CustomGizmos.DrawRegularPoligon(new Vector3(5, 0, 4), Vector3.right, circleRadius, 30, currentDirection); }