Hi there!
I’m using ContactFilter2D to filter collider results based on Z (depth) as folllowing and consider minDepth as 1 and maxDepth as 10 but when the object collides with 2 other colliders with one Z=0 and the other Z=2 it returns both of them however it should only return collider object with Z=2 because minDepth is one!
var result = new Collider2D[2];
var cf = new ContactFilter2D();
cf.useDepth = true;
cf.useTriggers = true;
cf.SetDepth(1, 10);
var count = _cardCollider.OverlapCollider(cf, result);
Appreciate any helps!