Insert self-promotion here.
This will handle collisions for you, if you'd like.
moving a polygon
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: moving a polygon
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: moving a polygon
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)
Who is online
Users browsing this forum: Google [Bot] and 3 guests