How do you create a MeshInstance3D that matches its CollisionShape3D?

Godot Version

Godot 4.2.2


My tree looks like this:


The CollisionShape3D uses a ConvexPolygonShape3D with an array of 5 points. I also want the MeshInstance3D to have the exact same 5 points.

When I select Mesh->ArrayMesh I don’t see the option to add points to the ArrayMesh.

It would be nice if I could just press a button and make the ArrayMesh match the shape of the collision shape, but I will settle for inputing the points one by one. But how do I add points to an ArrayMesh in the editor?!?!?!

I suggest implementing a tool script that calls upon the get_faces() method of the ConvexPolygonShape3D class to retrieve all its vertices. This approach could be utilized for dynamically generating grids.