Hello Monkeys,
Maybe this is an easy question but there’s a good chance that my brain is a bit heated by thinking a while for different coordinate solutions
I have made a custom plane and now I’m trying to generate the texCoords:
Vector2f[] texCoord = new Vector2f[vertMax]; count = 0; float vert_xmaxf = (float)vert_xmax; float vert_zmaxf = (float)vert_zmax; for (int z = 0; z < vert_zmax; z++) { for (int x = 0; x < vert_xmax; x++) { texCoord[count] = new Vector2f(x/(vert_xmaxf-1), z/(vert_zmaxf-1)); System.out.println("Cnt: " + count); System.out.println("x: " + x/(vert_xmaxf-1)); System.out.println("z: " + z/(vert_zmaxf-1)); count++; } }
The code reverses the texture like a mirror does (two times mirrored). Any ideas why it does that?
Yeah, I only searched for any pic I could use and so the Anno screenshot was just okay
Edit: Seems like this was the wrong way to post code. How can I insert these nice scrollable Codeboxes?