I would create a new smaller buffer and copy the previous one into.
Once a buffer is used, I don’t think it’s possible to resize it. You can update portions but the buffer size stays the same.
I think what @arcman7 wants to do is to make the rock larger, not the buffer size (?)
If that is so, @arcman7 what you did is ok, the problem being that the rock is not centered in its local coordinate system. You can recenter it by offseting the vertices by the bounding box center:
I think it’s safe to say that any mesh not centered within it’s own local coordinate system is likely to exhibit strange behavior not intended by the user of the mesh (just think: developers who aren’t designers downloading gltf assets from websites such as sketchfab). I think I’ve experienced other issues caused by the same problem that Cedric has happened to help me with in the past.
Is this a common problem? If so, and it’s not just me, I’d like to start brainstorming on a plugin or utility function within Babylon.js that will “clean up” a given mesh. I recall non-positive scaling determinants also being another potential issue that could be cleaned.
In short, I’d like a way for a non-designer or graphical artist to drop in a mesh and being able to export an equivalent gltf file that just doesn’t have any of these weird issues. I’m willing to contribute on this front if you guys deem it a good idea.