public static Vector3 RandomCircle(Vector3 center, float radius) { float ang = GameMasterScript.Random(0f, 1f) * 360; Vector3 pos; pos.x = center.x + radius * Mathf.Sin(ang * Mathf.Deg2Rad); pos.y = center.y + radius * Mathf.Cos(ang * Mathf.Deg2Rad); pos.z = center.z; return(pos); }
public static Vector3 RandomCircle() { float ang = GameMasterScript.Random(0f, 1f) * 360; Vector3 pos; pos.x = Mathf.Sin(ang * Mathf.Deg2Rad); pos.y = Mathf.Cos(ang * Mathf.Deg2Rad); pos.z = 0; return(pos); }