How to rotate camera in FPS with joystick

i want to rotate my camera with a joystick, as we move our player in FPS with a joystick.
first time working on FPS. need help Thanks

If you using Unity provided First Person Controller, you can just adding new input information in the Input Manager with the name of Mouse X and Mouse Y

@walaoRIKI I tried this solution and it doesn’t seem to work for my setup; the setup is working with the mouse (the rotation works properly) but is not functioning for the joystick. To be clear, I only want the character to be able to “look around” the scene; not to move positionally.

I know that the joystick (which is a 12-button game controller) is connected because for some reason the “Jump” input works using joystick button 3.

Is there a script that needs to be implemented in an addition to the changes you showed above?

Thanks for your help!

Thanx WalaoRIKI! Needed that info. It works for me with my x-box controller using your method, though I had to use 4th axis on the new mouse X I created.

please see the following youtube video