Okay, straight to the point I'm working on a game engine in C++ using SDL and openGL with lua scripting and I need to get the angle of the analog stick to determine the direction of the 2d gun using this lua code
playerLookArrow.rotation = math.atan(logic:controllerAxisForce(3)/-logic:controllerAxisForce(4))
logic:controllerAxisForce(int AXIS) returns
SDL_JoystickGetAxis(Joystick, AXIS);
The problem is that my gun will only point to the left instead of left and right.