diff --git a/gamecore/modules/world/actors/actor2D.lua b/gamecore/modules/world/actors/actor2D.lua index 27c2e46..d8c6be4 100644 --- a/gamecore/modules/world/actors/actor2D.lua +++ b/gamecore/modules/world/actors/actor2D.lua @@ -51,6 +51,8 @@ function Actor2D:initPhysics(x, y, w, h) self.xsp = 0 self.ysp = 0 + + self:setFilter() end function Actor2D:register() @@ -79,13 +81,20 @@ end -- MOVEMENT FUNCTIONS -- Basic functions from the movement. +function Actor2D:setFilter() + -- Init the bump filter + self.filter = function(item, other) + return nil + end +end + function Actor2D:autoMove() self:move(self.x + self.xsp, self.y + self.ysp) end function Actor2D:move(newx, newy) local cols, colNumber - self.x, self.y, cols, colNumber = self.world:moveActor(self, newx, newy) + self.x, self.y, cols, colNumber = self.world:moveActor(self, newx, newy, self.filter) end -- DRAW FUNCTIONS