I am making a 2d platform game. For keyboard control, I set the keydown left arrow then set the scale of the gameobject like x to -1. The character will turn to left direction. For right flip, I set x to 1. The flipping works well in keyboard control.
Here is the problem. When I use the left joystick, I make the get axis action and store the value as xspeed, so I can know if the joystick is used. Then I make the float compare action, if the xspeed is between 0-1 or xspeed equals 1, it will take to the flip right action. If the xspped is between -1-0 or xspeed equals -1, it will take to the flip left action. But it show me an error: fsm loop count exceeded maximum.
So I wanna know any good solutions for this. I am a new here, solutions step by step will be much better.