Esempio n. 1
0
    void OnWizardCreate()
    {
        //float diameter = radius * 2f;
        //float circumference = Mathf.PI * diameter;
        //float interval = 360f / (circumference / (thickness * 2f));

        GameObject torus = new GameObject("Torus");

        Torus.CreateTorusMesh(torus, radius, thickness, color, tubes);

        Selection.activeObject = torus;
    }
Esempio n. 2
0
    //private float orbitDistance;

    // Use this for initialization
    protected override void Start()
    {
        base.Start();

        if (this.orbitCenter != null)
        {
            float orbitDistance = Mathf.Abs(Vector3.Distance(this.gameObject.transform.position, this.orbitCenter.transform.position));

            this.torus = new GameObject();
            this.torus.transform.position = this.orbitCenter.transform.position;

            Torus.CreateTorusMesh(this.torus, orbitDistance, 0.007f, Color.white);
        }
    }