Ejemplo n.º 1
0
        public virtual void generateFairing()
        {
            ArcMeshGenerator gen = new ArcMeshGenerator(Vector3.zero, faces, panels, startAngle, endAngle, thickness);
            gen.outsideUV = outsideUV;
            gen.insideUV = insideUV;
            gen.edgesUV = edgesUV;
            foreach (ArcRing ring in profile)
            {
                gen.addArc(ring.height, ring.radius);
            }
            Vector3 pivot = new Vector3(0, 0, -profile[0].radius);
            panelPivots = gen.generatePanels(rootObject.transform, pivot);

            int len = panelPivots.Length;
            defaultPivotLocalRotations = new Quaternion[len];
            for (int i = 0; i < len; i++)
            {
                defaultPivotLocalRotations[i] = panelPivots[i].transform.localRotation;
            }
        }
Ejemplo n.º 2
0
        public virtual void generateFairing()
        {
            ArcMeshGenerator gen = new ArcMeshGenerator(Vector3.zero, faces, panels, startAngle, endAngle, thickness, generateColliders, facesPerCollider);

            gen.outsideUV = outsideUV;
            gen.insideUV  = insideUV;
            gen.edgesUV   = edgesUV;
            foreach (ArcRing ring in profile)
            {
                gen.addArc(ring.height, ring.radius);
            }
            Vector3 pivot = new Vector3(0, 0, -profile[0].radius);

            panelPivots = gen.generatePanels(rootObject.transform, pivot);

            int len = panelPivots.Length;

            defaultPivotLocalRotations = new Quaternion[len];
            for (int i = 0; i < len; i++)
            {
                defaultPivotLocalRotations[i] = panelPivots[i].transform.localRotation;
            }
        }