'Unity2D OverlapCollider detects an collider when its not overlapping at all
ContactFilter2D _contactFilter = new ContactFilter2D();
_contactFilter.SetLayerMask(LayerMask.GetMask("Box"));
List<Collider2D> _overlapColliders = new List<Collider2D>();
int _collidersCount = hitboxCollider.OverlapCollider(_contactFilter, _overlapColliders);
if (_collidersCount)
{
Debug.Log("I detected an collider when its not true at all!");
}
Here a screenshot of my case -> Sample
As the title said, I can't find a solution at all, maybe I'm missing something. Thx, and sorry for my bad question.
Solution 1:[1]
I found out that "Default Contact Offset" is the cause. Here link related to this: https://stackoverflow.com/a/53101873/13162558
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Death Pad |
