Configuring Collisions

Up until this point, we have configured a couple of CollisionMasks… now let’s dig into that a bit deeper and configure what those values mean.

Head into the Project->Project Settings menu and locate Layer Names->2D Physics in the left side panel:

2D-Physics-Layers in Godot - Screenshot

These layers are used to determine both on what layers a physics/collision object exists on and which other layers the interact with.

We set up the following layers:

Collision-Layer-Definitions in Godot - Screenshot

Now that we have the collision layers configured, re-open the Player scene, select the Area2D node and set the collisions like this:

Player-Collision-Layers in Godot Screenshot

 

1 thought on “Configuring Collisions”

Comments are closed.

Scroll to Top