Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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);
    }