How do you offset a collision box relative to an object?
What i am trying to do it make the collisionbox half the height of the player. It has to cover the bottom half of it.
Code: Select all
collisionWorld:add(self, self.x, self.y, self.width, self.height/2)
The obvious solution is to change the y value... Problem is, i cant.
Code: Select all
collisionWorld:add(self, self.x, self.y, self.width, self.height/2)
--Gives the exact same result as this:
collisionWorld:add(self, self.x, self.y+self.height/2, self.width, self.height/2)
-Note: im using middleclass for objects