Skip to content

Collision Layers ​

Everything physical in the game sits on a layer, and each layer has a mask: the list of layers it collides with or sees. A player collides with the terrain but not with other players; a projectile hits characters and destructibles but not chests; the camera only cares about walls. Game Settings > Collision Layers shows the layers and lets you change what each one sees.

The layers themselves are fixed, because the game's code uses them by name. Only the masks are yours.

The layers ​

#LayerWhat is on it
1World terrainStatic world geometry
2Player charactersThe characters the player controls
3All NPCsEvery NPC, whatever its faction
4Environmental destructiblesDestructible objects (crates, doors that can be broken, target dummies)
5Interactable objectsChests, switches and other non-destructible interactables
6Moveable objectsPhysics objects that can be pushed
7ProjectilesSpells, arrows, bullets
8Items and lootDropped items
9Player petsCompanions and pets of the player
10Area effectsThe shapes of area effects
11Trigger areasQuest triggers and detection areas (Trigger areas)
12Camera detectionWhat the camera collides with
13Mouse detectionWhat a mouse click can pick

(Layers 15 to 32 are reserved for later.)

The default masks ​

LayerSees by default
World terrainnothing (it does not move)
Player charactersterrain, destructibles, interactables, moveable objects
All NPCsthe same
Environmental destructibles, Interactable objectsnothing
Moveable objectsterrain, player characters, NPCs, other moveable objects
Projectilesterrain, player characters, NPCs, destructibles
Items and lootterrain
Player petsterrain, NPCs, destructibles, interactables, moveable objects
Area effectsplayer characters, NPCs, player pets
Trigger areasplayer characters, NPCs, player pets
Camera detectionterrain, destructibles
Mouse detectionplayer characters, NPCs, destructibles, interactables, items

The editor ​

ControlWhat it does
The listSelect a layer to edit
The checkboxes"Check the layers that this layer should collide with": tick a layer to let the selected one see it
Reset Layer to DefaultPuts the selected layer back to its default mask
Reset All to DefaultsPuts every layer back
Reload ConfigReads the saved file again, undoing unsaved changes
Save ConfigurationWrites collision_layer_config.tres ("Saved!" shows for a moment)
A warning lineShown when something looks wrong (an invalid layer)

Things to know ​

  • A mask is one-directional: "the projectile sees the NPC" does not mean "the NPC sees the projectile". For two things to collide physically, one of them needs the other in its mask; for something to detect the other (an area effect finding characters), the detector needs it.
  • Characters and NPCs do not collide with each other by default, so a crowd can pass through itself. To make NPCs block the player, tick All NPCs in the mask of Player characters (and the reverse).
  • If a change seems to do nothing, check that the object is on the layer you think: the layer of an object is set by its kind, so you cannot move a chest to another layer here.

See also ​