So I connected a ps3 controller to my computer via USB cable, when I press play I am able to move by using arrows on the left of the ps3 controller and also I am able to shoot and aim by triangle and circle but when I try setting up the 2nd Horizontal axis in the Input Manager by changing the "X axis" to 5th axis (so I could use sticks to move) and changing type to joystick axis I am not able to move. Also I tried creating a second "Mouse X" and also setting it to joystick axis and changing the "X axis" to "4th axis (joysticks)" nothing happens again, I tried pressing everything but it doesn't work. Anyone knows how I can make it work?
The PS3 controller is not directly compatible with PC. You will need a driver and a program to translate the controls to the format used on a PC.
If you search the net, most articles will refer to an app called MotionInJoy but I've read many reports online that it is adware (maybe worse) and it's advised to avoid it. I've not used it but better safe than sorry.
I have used pcsx2 to emulate the XBOX controller using my standard 6-axis controller for games that only work with XInput and this app should also work to emulate your PS3 controller (doesn't work in windows) as an XBOX controller (does work on windows). I can confirm that pcsx2 works well.
You will need to download the official driver for the XBOX controller and the pcsx2 app, then configure pcsx2 to map your PS3 controls to the XBOX controls.
See this forum post for full instructions.
PS: Some folks in that thread also mention BetterDS3 as another option instead of pcsx2. I've not tried it but if you are having trouble getting pcsx2 to work, you might want to try that one. It may be a little simpler to get it working, though pcsx2 wasn't very complicated and is more flexible/useful.