Ok I know this may sound confusing but what I'm basically doing is I'm taking 3D points in the world-space and converting them to 2D points in the screen-space based on the CFrame of an artificial camera. I know that was hard to understand so here's a gif of what I'm doing.
The code runs fine, but my only problem is that I have no way of placing triangles in front of each to prevent issues like this.
The camera is looking up at the object from the bottom and the red surface is the bottom so all that should be visible is the red surface, but as seen from that picture, that's not the case.
My question is this: what is the most efficient way for me to check if the 3D triangle is in front of or covering another 3D triangle so that I can change the ZIndices of the respective 2D triangle?
