Quantcast
Channel: Answers for "Direction of a mesh"
Viewing all articles
Browse latest Browse all 4

Answer by Berenger

$
0
0
for(int i = 0, n = 0; i < mesh.triangles; i += 3, n++){ Vector3 normal = mesh.normal[n]; Vector3 p1 = mesh.vertices[ mesh.triangles[i] ]; Vector3 p2 = mesh.vertices[ mesh.triangles[i+1] ]; Vector3 p3 = mesh.vertices[ mesh.triangles[i+2] ]; // Do your business here } That code isn't tested.

Viewing all articles
Browse latest Browse all 4

Trending Articles



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