0 votes

Hi,
I'm building a 3D voxel game. There voxels are implemented in a way that only the faces that are visible are added to the Mesh in the MeshInstance. The problem comes when you place or destroy a voxel, then the faces of the adjacent voxels must change: a face must be added or removed. How can I edit the initial Mesh? The Mesh is generated through SurfaceTool.

My alternative idea, if it is not possible to edit the Mesh, is to destroy the Mesh and create a new one with the modification, but this might be less efficent.

Godot version 3.4
in Engine by (236 points)

Hi i don't know if this help but lucy lavend did a video explaning generated mesh with code and more, you should check it out: https://youtu.be/DoUTndJ-8oY

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.