Top Down Shooter Mouse Aim Bug

I’ve setup a mouse aiming system for our top down shooter, but when the mouse is near the player the character spins out of control. I’m assuming this has to do with the character trying to rotate towards itself since the cursor is at almost at the same location. Below is the setup I’m using in the player controller.

Is there anything I can add/change to prevent this?


Spinning Character](Screen capture - 37a1f1ae9625e76e733138da97917c3a - Gyazo)

If you get the distance between the bullet spawn and mouseworldSpace, and check it’s length before setting actor rotation, you can essentially stop it from rotating within x distance of the object.