Hi, I try to modify the uvs of a mesh with no real success
Code:
public void update(float tpf) {
super.update(tpf);
if (init) {
setGravity(50);
setJumpSpeed(50);
setFallSpeed(50);
init = false;
} else {
float du=10*(float) Math.random();
VertexBuffer uvs = creatureGeo.getMesh().getBuffer(Type.TexCoord);
for(int i=0;i<uvs.getNumElements();i++)
{
float u=(Float)uvs.getElementComponent(i, 0);
float v=(Float)uvs.getElementComponent(i, 1);
uvs.setElementComponent(i, 0, u+du);
uvs.setElementComponent(i, 1, v);
}
…
can someone help ?
the uv map should be modified on u axis randomly