---
title: "Generate Godot collision shapes from a mesh | Spatial Compiler"
description: "Generate convex collision shapes from any mesh and get them inside the GLB, so Godot 4 builds the physics bodies when it imports the file."
canonical: https://appliedmanifold.com/use-cases/gen3d/godot-collision-shape/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Use cases](https://appliedmanifold.com/use-cases/)
3.  [Generated models](https://appliedmanifold.com/use-cases/generated-models/)
4.  Godot collision shapes

# Generate Godot collision shapes from your mesh

Send a mesh and get it back with convex collision shapes stored inside the GLB. Godot 4 turns them into collision shapes when it imports the file, with no hand-built shapes and no editor steps.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys&job=generated-model) [Start with your agent](https://appliedmanifold.com/use-cases/gen3d/godot-collision-shape/#get-started)

![The compiled wagon in Godot 4 with collision shapes hidden](/use-cases/jobs/godot-collision-shape/before.webp)

![The same wagon in Godot 4 with visible collision shapes turned on, drawn in cyan](/use-cases/jobs/godot-collision-shape/after.webp)

The wagon in Godot

64 collision shapes

-   **64**convex shapes generated from one mesh
-   **33,657**visible triangles Godot no longer tests for contact
-   **$5**Free signup credit for 50 mesh Drafts
-   **Under 2 min**from upload to download on the hosted API

Godot 4 screenshots of one import. Compiled on the hosted API on 3 December 2026.

## Automatic collision shapes

Godot's Mesh menu builds collision one model at a time, inside the editor. A single convex shape around a wagon fills the space between the wheels, and a trimesh shape follows every triangle but is meant for static bodies.

You repeat those clicks for every model and again every time a model changes.

## What the terms mean

-   ### Convex shape

    A shape with no dents, like a box or a pebble.

    Physics engines test convex shapes quickly.

-   ### Convex decomposition

    Splitting a model into many convex shapes that follow its outline.

    The wheels, poles and roof each get their own shapes, so contact feels right.

-   ### Trimesh shape

    Collision built from every visible triangle.

    Accurate but slow, and Godot meant it for static bodies.

## How it works

1.  ### Send the mesh

    Your agent uploads a GLB, FBX, OBJ, STL or PLY over MCP, or your code calls the REST API.

2.  ### Ask for convex pieces

    The spec sets collision to convex decomposition. Your first 50 mesh Drafts are free with the $5 signup credit.

3.  ### Import into Godot

    Godot 4 reads the shapes stored in the GLB and adds them to the imported scene.

[Read how convex hulls work](https://appliedmanifold.com/learn/convex-hull/)

## Questions

### How many collision shapes do I get?

The wagon and the robot each got 64 convex shapes. The report lists every shape, so your agent can check them.

### Can I use the shapes on moving bodies?

Yes. Convex shapes work on static, rigid and character bodies, unlike a trimesh shape.

[All use cases](https://appliedmanifold.com/use-cases/)

## Use with your agent

Paste the prompt into Claude Code, Cursor or Codex. Your agent connects to Spatial Compiler and comes back with a GLB with convex collision shapes that Godot 4 imports, plus a report.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys&job=generated-model) [Try it in the Playground →](https://console.appliedmanifold.com/playground?module=meshfx&item=namaqualand_rocks)

New accounts start with $5 of usage, and you see the price of each job before it runs.

Agent prompt

Connect the Spatial Compiler MCP server at https://spatialcompiler.dev/mcp if it isn't connected yet. Use meshfx to generate convex collision shapes for this mesh and pack them into the GLB so Godot 4 imports them, keeping the visible mesh and its texture. Run a Draft first. Your first 50 mesh Drafts are free with the $5 signup credit. Ask before running a final compile.

Or add the server yourself in Claude Code:

`claude mcp add --transport http spatial-compiler https://spatialcompiler.dev/mcp`

[Set it up in Cursor, Codex or another agent](https://appliedmanifold.com/docs/mcp/)

Once connected, your agent can call the `starter` tool for a ready fire Draft spec and the exact call that runs it. Your first 100 fire Drafts are free with the $5 signup credit.
