I understand how to texture the quad, however the texture stretches whenever the quad is not the correct proportions (the texture is 1:1 and the quad is 1:2 for example). I would like to texture the quad with the tiling texture rather than have the texture stretch. I am certain there is a very simple way to do this but I can’t seem to find it for the life of me.
The quad is dynamically sized, however I can re-map the texture after resizing easily.
Thanks for your help,
Mystor
Thats the texture coordinates. If your quad has double the x size then multiply the texture x coordinates by 2.
Ah, that makes sense. Quick question, where would I set the texture coordinates?
On the mesh.
Ah, thank you very much. I was looking at the material to try to find them.
I think I have it figured out now.
So I am having a bit more trouble than I thought I would. Looking through the javadocs I see a class (com.jme3.scene.TriMesh) which does not appear to be in my copy of the jME3 library. Instead I have a class called mesh where the only function I could find related to texture coordinates is scaleTextureCoordinates.
Are the javadocs out of date or am I looking in the wrong place?
You look at the jME2 javadoc.
Thank you very much. I have now gotten the texture to be mapped correctly (it is the right size) however it doesn’t seem to be tiling, instead the pixels on the side which should be tiled are extended off to the side to the edge of the mesh. How do I ensure that the image tiles?
EDIT: Nevermind I figured it out, I had accidentally changed the wrap-mode on the texture in my earlier experiments.