Re: moving a polygon
Posted: Thu Feb 20, 2014 10:30 pm
Insert self-promotion here.
This will handle collisions for you, if you'd like.
This will handle collisions for you, if you'd like.
Neat, didn't notice that.micha wrote:And you can even shorten your code and save one transformation. Replace these lines:by these:Code: Select all
love.graphics.translate(posX-cx*sx,posY-cy*sx) --first translate to position love.graphics.scale(sx,sy) love.graphics.translate(cx,cy) --rotate around center
Code: Select all
love.graphics.translate(posX,posY) --first translate to position love.graphics.scale(sx,sy)