
Hi,
yes, adding 8way joystick is not a problem. It is already implemented in virtual joystick (Master of puppets). Physical gamepad currently supports
- 4way joystick – 4 directions (mostly up, down, left, right). Here can be enabled diagonals, so nearest directions are fired together. For example left-top direction fires left and up keys together.
- diagonals joystick – 4 way, but in diagonal directions
You can bind first type to left stick and second to right stick
In previous beta was for a while implemented true 8 way joystick, but working with this type was hard and it did mistakes. For example :
numpad 7 | numpad 8 | numpad 9 |
numpad 4 | Middle | numpad 6 |
numpad 1 | numpad 2 | numpad 3 |
8 way joystick looks like circle with 8 parts. Each part has 45°.
Let’s say you move analog stick from middle to top-left direction. You must hit 45° angle (not so big angle, in 4way joystick you must hit 90°). Analog stick reports X and Y coordinates which are converted to appropriate direction.
But..you can really hit top-left angle, but during stick movement you can easily enter left or top directions. In this case is top-left direction finished and is started new direction. This does mistakes. It was reduced significantly when I set big deadzone, but it still did mistakes, so I better removed it from v46. The same issue happens when stick moves to side as well when it returns back to deadzone – in both ways you can jump between nearest directions. And I don’t know how to solve this issue. 45° is small. How it works in other emus? I’ll be happy for any idea what can lead to solution.
Here is how the 8 directional joystick works:
I was thinking about it last times and I one probably usable idea come on my mind. At beginning if you are in deadzone I can calculate which angle you hit (just like now, without modifying algorythm). Then if you change direction (f.e from deadzone to left-up) then I will not check joystick’s axis against 45°, but I’ll increase the active angle, f.e to 65°. This could avoid jumping between nearest directions.
Best regards,
Tony