Custom heightmap collision shape resolution

Godot Version



Hello :wave: I recently started creating terrain meshes through a script and wanted to explore doing the same for the collision shape but I don’t see how to change the resolution of the heightmap shape. My mesh has the vertices spaced 10m apart but the collision shape always uses a 1m spacing.

Maybe this fixed spacing is for more accurate collisions but I was wondering if there was a way to better match the collision shape to the mesh.

Edit: I found that calling create_trimesh_collision() on the mesh instance actually creates a collision mesh that matches 1 to 1 with the mesh. I am still curious though if anyone knows how to manually create one of these meshes. Maybe ConvexPolygonShape3D is the answer