private void finalizeLeaf() { LeafGenerator lg = new LeafGenerator(); Mesh leaf = lg.generateLeafMesh(points.ToArray()); GameObject newLeaf = Instantiate(meshObject); newLeaf.transform.localScale = transform.localScale; // leaf = reverseNormals(leaf); newLeaf.GetComponent <MeshFilter>().mesh = leaf; newLeaf.GetComponent <MeshCollider>().sharedMesh = leaf; newLeaf.transform.position = new Vector3(0, 5, 0); createLeafImage(200, 200); Destroy(newLeaf); Instantiate(nextButton, new Vector3(30, 1, -30), Quaternion.identity); }
public void BSPTMap() { var grid = LeafGenerator.GenerateLeaf(); }
void Update (){ if (!is_full){ if (closest == null || closest.is_full || closest.distance > distance ){ closest = this; } } if (billboard != null){ billboard.visible = show_billboard; } if (!is_empty){ if (furthest == null || furthest.is_empty || furthest.distance < distance ){ furthest = this; } } }