Rotate image from imagetable

I have an explosion animation loaded in an imagetable

    Enemy1Explosion = gfx.imagetable.new('images/enemy-1-explosion')

I can draw the first frame of that explosion at 100, 100 by doing the following

            Enemy1Explosion:drawImage(3, 100, 100)

How can I draw it rotated? It is the pieces of the enemy, so I want the pieces to be in the same orientation as the enemy before he went to pieces.

Instead of drawing the image directly, you can call getImage first and then draw it rotated.

Enemy1Explosion:getImage(3):drawRotated(100, 100, angle)
1 Like