Search Unity

SetIndices creating odd meshes...

Discussion in 'PSM' started by Jonny-Roy, Jul 25, 2014.

  1. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Okay, not sure if anyone has come across this but:

    mesh.SetIndices(quads, MeshTopology.Quads, 0);

    Results in the mesh being created with double quads by the looks of it, so rather than creating 2 triangles per quad, it creates 4 triangles per quad, the original 2 you'd normally get plus another 2 rotated 90 degrees with flipped normals!!

    Anyone know of a workaround? This only affects PSM (I've built the same game on Windows Phone, BB10, iOS and Android)

    Thanks,

    Jon
     
  2. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    The workaround is to use triangles instead and do
    mesh.triangles = ...