Is it possible to move the position of the texture that is applied onto a mesh vertically? Appreciate any answers in advance, thanks.
you mean move the texture coordinates ? use moveUV from http://hub.jmonkeyengine.org/groups/contribution-depot-jme3/forum/topic/symmetry-mirror-modifer-uv-transformations/.
Tell me if it doesnt work.
i dont really understand the moveUV code there, if you could explain how to apply it to my code below:
Box snowBox = new Box(Vector3f.ZERO,100,100,0);
Geometry snowGeo = new Geometry(“Snow Geometry”,snowBox);
Material snowMat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);
snowMat.setTexture(“ColorMap”, assetManager.loadTexture(“Materials/snowyTexture.png”));
snowMat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
snowGeo.setQueueBucket(Bucket.Transparent);
snowGeo.setMaterial(snowMat);
Thanks for the quick response.
[java]
float uMove = 0.01f; //move from 0 until 1 max.
float vMove = 0.01f; //move from 0 until 1 max.
snowGeo.setMesh(new MeshData(snowGeo.getMesh()).moveUV(new Vector2f(uMove,vMove), 0).createMesh());
[/java]