I want one of the guns in my top-down shooter to have bullet spread. I know how to set the angle of the bullets to random(Within 30,60 degrees), but I'd like it to set these angles relative to where the gun is pointed at. Because at the moment it doesn't matter where the player is aiming, the bullets are travelling toward the bottom right of the screen.
What I'm trying to say is that I'd like the bullets to spread within a kind of cone on the front of the player like here.