Collision detection: collision box extends up and left of box
Posted: Fri May 13, 2016 6:45 pm
Hi everyone, I'm working on a simple top-down tile based dungeon crawling game (think the original Legend of Zelda). I'm trying to use the bump.lua (https://github.com/kikito/bump.lua) library to handle collision detection, although I encountered this exact same problem using the basic bounding box function (https://love2d.org/wiki/BoundingBox.lua) as well.
Basically, the tile with collision in the world seems to have its collision rectangle extended infinitely above and to the left of it. That is, if I try to move my player above the tile or to the left of it, it will still collide on nothing and prevent me from moving. I really have no idea what might be causing this, but you can see the entire source on GitHub here: https://github.com/darkfire613/undercity
Any wisdom on this would be greatly appreciated!
Basically, the tile with collision in the world seems to have its collision rectangle extended infinitely above and to the left of it. That is, if I try to move my player above the tile or to the left of it, it will still collide on nothing and prevent me from moving. I really have no idea what might be causing this, but you can see the entire source on GitHub here: https://github.com/darkfire613/undercity
Any wisdom on this would be greatly appreciated!