improvement(actor): ignore by default collision with actor own hitboxes

This commit is contained in:
Kazhnuz 2019-06-23 15:32:25 +02:00
parent 5c5b3eed34
commit 3314f1e3f9
1 changed files with 4 additions and 1 deletions

View File

@ -87,7 +87,10 @@ end
function BaseActor:setFilter()
-- Init the bump filter
self.filter = function(item, other)
if (other.isSolid) then
if (other.owner == self) then
-- ignore every collision with our own hitboxes
return nil
elseif (other.isSolid) then
return "slide"
else
return "cross"