Importing meshes as collisionshapes (Spartial)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lavaduder
:warning: Old Version Published before Godot 3 was released.

I was wondering if I could import a mesh as a collisionshape, I tried the mesh create static body, and the results (I tried them all) were poor. The best I got was with convex static body, But that made unneeded ramps, and did not allow for a concave polygon (Obvious but still) Is there a way to directly import the vertices’s positions of a mesh, or use the mesh itself for collision.

I am using Godot 2.1.3 stable, and Blender 2.78c

P.S. I noticed a lot of lag happening with my model in-game, I don’t know what it is, considering it’s a model with an extremely low polygon count.

:bust_in_silhouette: Reply From: rredesigns

You can do that by appending -col at the end of the mesh name before exporting so you can get the shape from the mesh vertices as a child. You might as well create a lower resolution version of the same object and parent it to the mesh, appending -colonly to the name of that mesh will make it a trimesh collision shape and of course, it will not be visible. In any case, Godot will use the available vertices to create the shape.

That’s how I do with the trees in my game, I place a 5 sided cylinder as a child of the trunk to get cleaner trimeshes.