You understand me clearly.
When I draw my player with offset x and y to be able to rotate it from the center (and using the collision code as it is):
Code: Select all
love.graphics.draw(player.img, player.x+player.w/2, player.y+player.h/2, player.angle,1,1,player.w/2,player.h/2)
However, when I draw it without the offset:
Code: Select all
love.graphics.draw(player.img, player.x, player.y, player.angle,1,1,player.w/2,player.h/2)
And remove this collision code:
Code: Select all
local newX, newY, cols, len = world:move(player, player.x, player.y)
player.x, player.y = newX, newY
Player is within the box:
Link:
http://oi61.tinypic.com/333dfuo.jpg
This is clearly showing me something, can someone do something with the collision code is there a solution?