Sorry about the title isn't very descriptive but it's a bit difficult to explain what I'm going to talk about.
First of all, thank to @jeanfabre for their examples. I'm using his work as a starting point.
My idea is calc the distance between point (0,0) and the current one of the joystick. Then make a FMS, where:
-By default my character is in idle state
-If 0<distance<0,5 make my character state is walk.
-If 0,5<distance<1 my character state is running.
The problem is that the furthest distances are in the points (-1,-1) and (1,1) because my joystick's limit movement is a square and it's 1,41 instead of 1. In
that case, for example, the limit movement is a circle.
Are there a simply way to modify the movement shape?
Cheers!!