for i=1,#enemies do
local candidates = collider:neighbors(enemies[i].mask) --Mask is a reference to the HC shape
for other in pairs(candidates) do
local collides, dx, dy = enemies[i].mask:collidesWith(other) --Get the boolean event, and the collision resolution data
if collides and not other.ignore then --THIS IS WHAT YOU WANT, the check on other to ignore
if other.type == 'static' or other.type == 'character' then --Other additional checks
enemies[i].mask:move(dx,dy) --Collision Resolution
elseif other.type == 'debris' then
other:move(-dx,-dy)
end
end
end
end
Thanks!
It turned out I had a typo somewhere, since after I unified all the names (now every object has hco property with a reference to HC shape) my code worked as well as yours!