I am trying to make a prototype sword-fighting game.
I want the player to be able to hold a sword in front of them based on where they are looking.
The idea is that they use their mouse to maneuver their sword for defense, so they can position it to parry attacks. If a player moves their mouse to the left, the sword will be on their left to deflect attacks from that direction, and vice versa to the right. In order to construct the physics for parrying I need the animation.
So, how do I play an animation constantly; such that the animation is dependent on the player’s mouse movement?