#do they have colliders

1 messages · Page 1 of 1 (latest)

whole plank
red geyser
#

What kind of collider are you using for the overlap?

royal stream
#

based on cursory examination of this stuff, this setup should work, though you're doing a couple things I would consider incorrect:

  • You're ignoring the return value of OverlapCollider2D. Your for loop shoild use the return value to know how many iterations to do, rather than using foreach
#

Another improvement would be to simply define the contact filter in the inspector and set it up there

#
public ContactFilter2D filter;```
red geyser
#

Try debugging the return value of the overlap

whole plank
whole plank
#

filter.SetLayerMask(LayerMask.GetMask("Clickable"));I wont need this line anymore if I do inspector right

#

this is their debug, always 0

#

...

#

use triggers caught them...

royal stream
#

yeah

#

because they are trigger colliders

whole plank