EngoEngine/engo

Scale operation seems to move the entity to the wrong position

drgomesp opened this issue · 0 comments

I have a spritesheet that I'm using to display different character animations, and for some of those animation frames, the spritesheet image cell is the same, except mirrored (walking right is a mirror of walking left).

My assumption for this mirror operation is to perform a simple Scale(-1,1) on the entity, however what happens is that it seems to move to the left for some reason. My guess is that because of the draw order and things being drawn from left to right, top to bottom, but I'm not sure.

Here's how the problem looks like:
Peek 2021-03-25 16-41

Does anyone have any idea of how to fix this?