Exemplo n.º 1
0
        // Token: 0x06004216 RID: 16918 RVA: 0x0014FF48 File Offset: 0x0014E348
        public override void GenerateColliderGeometry()
        {
            Mesh colliderMesh = base.GetColliderMesh();

            if (colliderMesh)
            {
                colliderMesh.Clear();
                EllipsoidPrimitive.GenerateGeometry(colliderMesh, this.width, this.height, this.length, this.segments, this.normalsType, this.pivotPosition);
                base.RefreshMeshCollider();
            }
            base.GenerateColliderGeometry();
        }
Exemplo n.º 2
0
        // Token: 0x06004214 RID: 16916 RVA: 0x0014FE94 File Offset: 0x0014E294
        public void GenerateGeometry(float width, float height, float length, int segments, NormalsType normalsType, PivotPosition pivotPosition)
        {
            MeshFilter component = base.GetComponent <MeshFilter>();

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

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