Basically, I need to have a inside-out cube to use for a cloud skybox overlay. So as we al know, triangles are only rendered on one side. So I thought I could simply flip the tris over, but it didn’t seem to work. Here is my script:
`
using UnityEngine;
using System.Collections;
public class FlipInsideOut: MonoBehaviour {
public int[] Tris = new int[100];
int temp;
void Start () {
Tris = this.GetComponent().mesh.triangles;
for(int i = 0; i < 100; i++){
if(Tris[3*i] != null){
temp = Tris[3*i+1];
Tris[3*i+1] = Tris[3*i+2];
Tris[3*i+2] = temp;
}
}
this.GetComponent().mesh.triangles = Tris;
}
}
`
Does anybody have any idea why it isnt working? I shouldn’t see the mesh from the outside.
If anybody could help me I’d be very happy.