Custom animations

Hi, I’ve seen in games like Lumber Tycoon 2 how when you swing your axe it faces towards the mouse in a very cool looking way. I wonder how I can create something similar in my game. So here is how it currently is:
image
image

You can easily notice how the arm is going straight forward but the fireball goes in a wrong direction which doesn’t satisfy me. I’m wondering how I can make it without messing other body parts animations like the legs if the player is moving while casting. Currently I’m just using an animation that only affects both arms and is set to priority.