Use the stick angle of XBOX Pad ?

Hello Blender artists. I’ve started a fake 2D Shooter with a top view (smth like hotline miami) playable with XBOX pad (left stick to move and right to shoot). The cursor/aim follows the player and can be moved in a limited perimeter around the player with the right stick but it’s not very handy at the end because it’s hard to aim up,down,right, or left due to the fact the cursor stick a little in the angles of the square perimeter… That’s why I wonder is there is a python way to get the angle of stick to be able to quickly turn the player to the chosen direction. Sticks are axis so I don’t know if Blender can get that kind of values…

I almost have it working, however for some reason it grabs X from the left, and Y from the right stick on my xbox controller…

Thanks, I managed to get the values of both x and y axis but I still don’t know how to use them to set a direction :confused:

if inputX outside dead zone
if own['X']>own['MaxX']:
if own['X']>own['MinX']:

same for Y axis



also, make the actor face the way he is moving,

and have the inputs apply force works as well,