TextureInfo is one way of doing it, but for a water animation, it might not be the best one. Using TextureInfo, you are going to change the coordinates on the client side. That means that after a change, the data has to be uploaded to the GPU again, which can be expensive in terms of performance. If you want to do this, you have to use a special build() call to allow for uv coordinate changes (build(true)
. You also have to use touch() on the object after modifying the coordinates.
Shaders are another way to do it. It's very flexible, but you have to use OpenGL ES 2.0 and you have to write your own shaders.
The easiest way is to assign a texture matrix to the object (
http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#setTextureMatrix(com.threed.jpct.Matrix)). You can translate the matrix just like a normal tranformation matrix and it will translate the texture coordinates in the same way. Just make sure that your translation values don't get too large after time, so it's a good idea to reset them when possible (like if your value is larger than 1, you set it to value-1 instead).