I am making a platformer game and I need the sprites to be flipped when it goes the other way. But when I use mirrorHorizontally(), I changes color of the sprite and made it more saturated. I do not want that. Is there a way to fix it?


// instance fields private GreenfootImage leftImage, rightImage; // constructor of class (adjust actor class name) public ActorClassName() { rightImage = getImage(); int w = rightImage.getWidth(), h = rightImage.getHeight(); leftImage = new GreenfootImage(w, h); for (int y=0; y<h; y++) for (int x=1; x<=w; x++) leftImage.setColorAt(w-x, y, rightImage.getColorAt(x-1, y)); }