i found a script that does it but is for old version of godot and i'm not able to recreate it in 3.0, so i need help with creating it
i found out that actually someone ported the code for joystick to 3.0, here it is
at the bottom of the page
I created a lib for this case, and you can select between d-pad and analog.
I know that topic is kind of old, but it is one of the ones that better indexed for the subject on google.