How to make my weapon rotate using Mouse movement

Basically something like this will work, you have to enable “mouse for touch” in the project settings (you can remove the default virtual joysticks) but this is a quick and easy way to get it done. Otherwise you would have to have a bunch of mouse events to tell when something is clicked vs clicked and held, and released. This needs some tweaking for your specific needs but you can get an idea of how to start from this. You will need to script logic for what to do when it reaches “90 degrees” how to return it back to center and how to change direction but just to rotate a component independent of the camera or parent actor this is one way to do it. You can change how fast it rotates by changing how large the float is that you add to the rotation. Currently it is only 1 degree so very slow.