- Home /
Physics.OverlapCircle not working when Layermask is applied
So i am having an issue with the Overlap Circle when I set the Layermask. Everything works as expected when i do not apply the Layermask. It picks up all colliders withing the range I specify.
This is all my Layermasks and how they are used on my objects -
I have the tower close enough to the enemy for it to pick it up with the overlap circle.. i know this because when I run the code with no layermask on the Overlapcircle it will pick up the tower and the enemy.. this is understandable and expected so i want to not pick up the tower and just pick up the enemy.
but when i apply the layermask it will no longer pick up anything as showed above... what am i doing wrong? Because when no layer is applied it will see the enemy.. just not when i specify the enemies layer....
Your answer
Follow this Question
Related Questions
I can't manage to detect my collisions 0 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How can I find intersection points between a circle and Colliders 2D ? 0 Answers