Posted June 8, 201411 yr Hello forums, I've recently been into rendering. I wanted to have some fun with the tessellator and rendering random 3D shapes, like this triangular prism: I currently have the two slanted sides, and the two triangular bits rendering. I want to know how to figure out what 'direction' a group of vertices faces. For example, this code renders the image below: tessellator.addVertexWithUV(0.0F, 0, 0, 1, 0); tessellator.addVertexWithUV(0.5F, 1, 0, 1, 1); tessellator.addVertexWithUV(1.0F, 0, 0, 0, 0); tessellator.addVertexWithUV(0.5F, 0, 0, 0, 1); But, by simply changing a couple of numbers(i.e. the first parameter) and switching some around, I can make it face the opposite direction. What about the new code makes it so that it faces another direction? I only have about 2 days worth of experience on this topic, so sorry if the answer is obvious. Any help is appreciated. EDIT: TheGreyGhost saves the day, once again. Thank you! <3 * The order of the vertices is important! If you are looking at a face, the coordinates must be given in an anticlockwise order. Otherwise, the face will be pointing in the wrong direction.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.