Example #1
0
        // Token: 0x0600425F RID: 16991 RVA: 0x0015142C File Offset: 0x0014F82C
        public override void GenerateColliderGeometry()
        {
            Mesh colliderMesh = base.GetColliderMesh();

            if (colliderMesh)
            {
                colliderMesh.Clear();
                SuperEllipsoidPrimitive.GenerateGeometry(colliderMesh, this.width, this.height, this.length, this.segments, this.n1, this.n2, this.normalsType, this.pivotPosition);
                base.RefreshMeshCollider();
            }
            base.GenerateColliderGeometry();
        }
Example #2
0
        // Token: 0x06004242 RID: 16962 RVA: 0x00150B3C File Offset: 0x0014EF3C
        public void GenerateGeometry(float width, float height, float length, int segments, float roundness, NormalsType normalsType, PivotPosition pivotPosition)
        {
            MeshFilter component = base.GetComponent <MeshFilter>();

            if (component.sharedMesh == null)
            {
                component.sharedMesh = new Mesh();
            }
            Mesh sharedMesh = component.sharedMesh;

            base.GenerationTimeMS = SuperEllipsoidPrimitive.GenerateGeometry(sharedMesh, width, height, length, segments, roundness, roundness, normalsType, pivotPosition);
            this.width            = width;
            this.height           = height;
            this.length           = length;
            this.segments         = segments;
            this.roundness        = roundness;
            this.normalsType      = normalsType;
            this.flipNormals      = false;
            this.pivotPosition    = pivotPosition;
        }