s
skysurveil

Nodes that don't need a collision layer?

In some of the chapters/exercises, I recall some pickups and other nodes having no collision layer, only a collision mask.

I am familiar with the analogy of Layer: What am I vs. Mask: What do I see.

I want to understand the reasoning for pickups in certain sections of the course having no collision layer and 1 or more masks.

Is this because nothing else has to detect the pickup entering it?
Since the pickup only detects player entering it for body_entered signal, it only needs to have a mask that matches the player's collision layer?

Separate question: would we apply the same logic to the PressurePlate from the end of Obstacle Course Part 2? It is provided with Layer 1 and Mask 1. Is Layer 1 (or any layer) required?

  • Nathan Lovato replied

    Is this because nothing else has to detect the pickup entering it?

    Exactly, yes, you got it right.

    would we apply the same logic to the PressurePlate from the end of Obstacle Course Part 2? It is provided with Layer 1 and Mask 1. Is Layer 1 (or any layer) required?

    You could, absolutely. I just checked and it doesn't seem anything else needs to detect it. It's not really an issue if you leave the layer on, but earlier in the course we took the time to teach you removing it to help you understand and memorize how layers and masks work (many Godot users who learn with other tutorials don't).