#do they have colliders
1 messages · Page 1 of 1 (latest)
What kind of collider are you using for the overlap?
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;```
Try debugging the return value of the overlap
yea this is another thing, it's my first time to use this Contaxtfilter thing
oh good idea. will try
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...
you need to check Use triggers
yeah
because they are trigger colliders
omg, that's just it...