I want to get the angle between the mouse cursor coordinates and the player.

Those two parameters are directions:

But top down aim offset doesn’t need so complicated method.
you could probably have a look at the previous post.How do I get the character to aim up or down TDS? - #9 by baobao4435