This script is used to re-import gltf assets to make rigidbody objects with custom collosion meshes.
This was tested with meshes made in Blender and exported as gltf.
Your gltf should have exactly one mesh with multiple children The root mesh is used for the MeshInstance3D of the RigidBody3D the child meshes are turned into CollisionShape3Ds for the RigidBody3D
To use:
- Import gltf normally into Godot 4
- Select the resource in the FileSystem pane
- Select the Import pane
- Scroll down and load this script as the "Import Script"
- Select re-import