why aren't my collisions working ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Inces

Player : layer 2 and 4, mask 1,2,3
Enemy : layer 2, mask 1,2,3
bullet: layer 2, mask 1,4

bullet does not collide with player. Nothing else changes masks/layers in runtime, these are final layers checked in Remote tab. It only collides with player when I set bullets both layer and mask to 4. It is not how I believed collision layers work. Can anyone explain it to me ?

:bust_in_silhouette: Reply From: Gluon

Try not putting the bullets on any layer and just having the masks set up. You dont specifically have to have a layer and if nothing else is looking to interact with it as such you can just set up a mask and then use signals from the bullet to indicate to others like the player when to do something.

It didn’t work.
But of course I discovered my bullet superclass was adding exception with player on ready… :stuck_out_tongue:

Still, I never thought of not using any layer for things like bullets, I like this idea, that makes things easier :slight_smile:

Inces | 2022-01-26 18:05