I am currently tring to get my actor which is a stick figure with a weapon to move left and right and face those directions while walking, when I turn left he turns upside down. I tried getImage().mirrorHorizontally() but it just made my actor flip constantly. I also tried doing
but that made my actor turn when I released left, which means I moved to the right and then turned to face left when I released left, and it wouldn't return back to right either, it just stayed with left.
So what I want to do is an actor that moves to the left and right and faces that direction (not being upside down). Can anyone help me?
if("left".equals(Greenfoot.getKey()) { getImage().mirrorVertically(); }