I’m trying to make a destruction system which uses Editable Meshes. Simply put, to do something like blowing a hole in a wall (the wall is a mesh) you destroy the vertices within the hitbox (then add effects and make it look good, etc). This is a simple explanation of what I’m trying to achieve.
I’ve only managed to setup an Editable Mesh and visualize the vertices. I tried making it so when you delete the attachments it deletes the corresponding vertex, but I got the error: Unable to remove vertex [number], vertex is still used in faces. I also tried removing the faces but I got another error mentioning API.
Also, would it be possible to subdivide an Editable Mesh like Blender does? Where you can choose a subdivision number and it would work on any mesh (creates vertices at subdivision points)
It very much is possible to subdivide like how it’s done in Blender, but you’d have to code that yourself with the API.
You could just simply do a lerp with the UV, normal and position of vertices and that would be the most accurate subdivision technique, but not exactly how it’s done in blender. It would multiply the triangles and vertices by whatever factor you’re doing but I’m unsure how blender was able to manipulate this technique to actually get the smoothing effect that subdividing does.
Please also mention the error you got when trying to delete the faces, as you’d have to delete all the adjacent faces of the vertex.
Hey thanks for replying, so the error I got from trying to remove a face using :RemoveFace() was “EditableMesh API function not available”. My plan is pretty much to have a destructible map with the meshes having the same subdivision amount, so when damage is done to multiple objects it will be as if it was the same mesh (in a way).
To be honest I just found out about editable meshes yesterday and I’m still figuring things out, I feel like because they’re still in the works and they’re so new not that many posts have been made about them.
I’d chalk this down to just being an API problem, since I’ve also seen other issues mentioned in videos relating to EditableMeshes, and some I’ve experienced myself. One example is that, I couldn’t change the vertexAlpha without having the mesh’s transparency above .01