Physics layers and masks: who detects whom
godot_collisionsDiagnose Godot physics collision layers and masks offline: find undetected bodies, areas, rays, or TileSet layers and get the exact mask value to fix failing collisions.
Instructions
The physics layers of the project, read from its scenes, offline. Use it when something falls through the floor, a bullet or pickup is not detected, body_entered never fires, or before you set any collision_layer or collision_mask. Without arguments: per physics world (2D, 3D) every layer in use with its name and bit value, how many nodes are on it and how many scan it; every body, area, ray and TileSet physics layer with its layers and mask as numbers, names and value (instances and inherited scenes resolved); and what can never work: a mask that scans a layer nothing is on (also the classic collision_mask = 3 meant as layer 3, which is the value 4), an area or ray with mask 0, an Area with monitoring off whose body_entered is connected, a body or area without a collision shape, a CollisionShape without a shape; plus the lines of code that change layers. between: [a, b] (node names or paths, scenes, class_names or Godot classes): for each pair, whether a detects b and b detects a, why, and the exact mask value that fixes it. value says which layers a bit value means, layers the value of layer numbers. It is an error when there are problems. Read-only.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "godot_collisions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | project folder, or a file or folder inside it (relative to the server's folder; default: the current project) | |
| value | No | a collision_layer or collision_mask value: which layers it means | |
| detail | No | brief (capped lists) or full (everything); default full | |
| layers | No | layer numbers (1 to 32): the value to write | |
| between | No | two names: who detects whom, e.g. ["Player", "Enemy"] or ["bullet.tscn", "Hurtbox"] |