[Solved :)] using TextureAtlas

Thanks :slight_smile: but ur code has something wrong with it. I got the idea, I’ll try to work on it from there but it’s throwing this error at

thebatch.batch()





[java]java.lang.IllegalArgumentException

at java.nio.Buffer.limit(Buffer.java:249)

at com.jme3.scene.VertexBuffer.copyElements(VertexBuffer.java:831)

at com.jme3.scene.BatchNode.mergeGeometries(BatchNode.java:495)

at com.jme3.scene.BatchNode.doBatch(BatchNode.java:202)

at com.jme3.scene.BatchNode.batch(BatchNode.java:175)[/java]



weird cz it does not throw it if I replace the atlas png with another png (one color) and remove the setBuffer() and updateBound()