I cant turn arrow to the cursor

Hey guys!
I’d like to ask you for help. I’m trying to implement aiming in my topdown shooter game, but I can’t make the arrow rotate in the direction of the cursor.


I tried to do it with different blocks in different connections but without success. Nothing happened or the arrow was spinning in random directions.

Thats my last try.

The slight offset sometimes seen is due to the line trace hitting the floor and that position being converted with the arrow offset in z axis