What is the difference between trimesh static body and StaticBody3D

Godot Version



Hello all ,
Im confused to when to use trimesh static body and when to use StaticBody3D
On MeshInstance3D
what are the rules ?
for example i have static rock static model

A StaticBody3D is a node while a trimesh in physics context refers to a “concave shape”.

A StaticBody3D physics node holds a PhysicServer body object. If it has one or more CollisionShape3D child nodes with a Shape3D it uses the shape(s) for its body object on the PhysicsServer.

Trimesh static body is a menu option name for an in-editor option when selecting a MeshInstance3D.

That option creates a StaticBody3D node with a CollisionShape3D node with an inefficient concave collision Shape3D made from the triangles of whatever Mesh the MeshInstance3D had when used.

There are some random functions and descriptions about a “trimesh collision” around the engine. That is a synonym for a mesh made with triangles and used by a ConcavePolygonShape3D.

While a ConvexPolygonShape3D uses triangles as well when talking about trimesh it always means concave shape. Convex is an important shape trait so it is always mentioned while concave also stands for “bad optimized and low quality collision shape, do not use if you can avoid it”. It is usually better to use multiple convex shapes before you use a single concave shape (trimesh collision).