Difference between using Group, Class_Name and Layers/Masks

Hello! I am currently in the “Platform Scene” part of the Course where two ways to ensure a player hits the plattform were shown: Layer/Masks and class_name.
Would it work the same if I use the group tab in the Node section of the editor?

As far as I know, it should; both approaches (class vs group) are used at different points in the 2D course and the end-result is the same whenever the condition is true.

The most sensible use-case I can think of (and this might be why groups were implemented in the first place) is if you have multiple classes that all need the same condition applied to them - for example, several different types of traps (which is what was done in the 2D course). Instead of checking [if class = this, or that, or xyz, or abc], you can just add them all to the same group and check for that one group name instead.

Basically, yes - you should be fine if the condition is coded right =)

1 Like

Ah thank you very much!
I didn’t do the 2D course so I misses that it seems

1 Like

Privacy & Terms