This forum is read only and just serves as an archive. If you have any questions, please post them on

1 decade ago by roger


I have loaded some images in my game and I would like to rotate them.
Anyone knows how to rotate or flip an image?


1 decade ago by alexandre

I think that the current version of Impact (1.18a) only lets you rotate Entity instances, and indirectly so: just set their animation to the desired rotation angle, e.g.,

update: function()
    this.currentAnim.angle = 45;

1 decade ago by dominic

You can create Animation instances without having an Entity, so the easiest way to have rotations and flipping is to wrap your Image in an Animation.

If you don&039;t want to do that for whatever reason, look at the source for #lib/impact/animation.js how it's done there and use the canvas methods directly.

1 decade ago by yatayata

note you have to specify x and y separately for flips

this.currentAnim.flip.x = true;
Page 1 of 1
« first « previous next › last »