Simple import script for importing meshes with custom collision as RigidBody3D with CollisionShape3D

The built in import functions (with import hints) do not support creating RigidBody3Ds with custom collision (only StaticBody3D).

I also happened to want to figure out how to make and use import scripts.

This was a simple enough task. I am sharing my results here.


This is interesting.

I’m working on a plugin in a similar vein, except importing meshes and setting a primitive CollisionShape (cube, sphere etc) sized and centered per the mesh, or multiple mesh’s AABB.

1 Like

There is a blender script I updated as a sister to this one to decompose meshes into convex hulls.

I am currently updating it and adding some functionality.

With it you can use V-HACD (which godot uses) or CoACD (which I prefer). But you can tweak their settings to get better results.

In Godot, I found that writing an import script was easier than making import plugin (although I will try that again sometime).

Anyway, please feel free to make the script your own if there is anything useful to you in it.

1 Like

Thanks i’ll check it out as I use blender also.