The docs say that you can call setDynamic() on a Mesh to make it so that you can then modify it, but they do not say how to do such modification. I have tried calling setDynamic() followed by calls to setBuffer(), but it throws an exception saying that once the data is set, it cannot be set again. I’ve tried just modifying the contents of the buffers that were set originally, but this doesn’t seem to have any visual impact either (assuming I’m doing it right!).
In what sense is it possible to modify a Mesh once it’s been made? I don’t see any other methods by which I can alter its data. (Obviously, not having to set the entire buffers again, but just tweak parts of them, would be great.)
Thanks for any help!
After you modify the VertexBuffers, call VertexBuffer.setRefreshNeeded() or updateData()
Works perfectly–my planet’s terrain is now sculptable–awesome! Thanks!