Quantcast
Channel: Latest Questions by zeuo
Viewing all articles
Browse latest Browse all 90

error in creating mesh script

$
0
0
Failed setting triangles. Some indices are referencing out of bounds vertices. is the error im new to creating meshes but i think the problem is the variables on the top i dont know what to put in them, i want to create a plane do i put 3 vertices and 2 triangles ?? and whats do i do for xyz var newVertices : Vector3[]; var newUV : Vector2[]; var newTriangles : int[]; function Start () { var mesh : Mesh = new Mesh (); GetComponent(MeshFilter).mesh = mesh; mesh.vertices = newVertices; mesh.uv = newUV; mesh.triangles = newTriangles; }

Viewing all articles
Browse latest Browse all 90

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>