Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Start() {
- Mesh mesh = GetComponent<MeshFilter>().mesh;
- Vector3[] vertices = mesh.vertices;
- int o = mesh.triangles[0];
- int t = mesh.triangles[1];
- int h = mesh.triangles[2];
- vertices[o] += Vector3.up * 2;
- vertices[t] += Vector3.up * 2;
- vertices[h] += Vector3.up * 2;
- mesh.vertices = vertices;
- mesh.RecalculateBounds();
- mesh.RecalculateNormals();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement