Snapping CSG vertecies to a grid to boost performance

Godot Version

4.5.1

Question

I am trying to streamline the process for level editing as much as possible and do it mostly in the godot engine when possible. I am trying to get the workflow down before I make a game so this is important. So naturally I am using a lot of CSG meshes to design the levels in godot. Don’t worry I will bake them into mesh instances so it doesn’t tank performance. But anyways I want to snap all the vertices coordinates of every CSG mesh to every sixteenth of a meter so that way Its much easier to align the meshes and that way I won’t have exponentially bigger polycount. But in order to that I need a way to snap the verticies without destroying the mesh or at least patching it if it does and auto merging verticies. How would I go about that?

Download Godot 4.7-dev3 or later. That functionality was introduced there. You can read about it here. Dev snapshot: Godot 4.7 dev 3 – Godot Engine

Here’s a link to the latest version for download: Dev snapshot: Godot 4.7 dev 4 – Godot Engine

1 Like