I am working on a melee game project, and i have a gameobject which holds the weapon, and it is what moves when i swing the weapon. It has an idle 'animation' (its just one keyframe of the idle position of the weapon), and then the 4 swing directions.
I do not use the animator to handle the transitions between idle and swinging, i want to use a script for that so i can control the windup speed easier, and also incase i decide to add feints and stuff that would interrupt the windup process, but i do use animations for the swing directions. What i want to happen is the script controls moving from the idle position to the very start of the swing position, and then the swing animation plays.
However, as long as the animator is active, any attempt to move the weapon with code does not work, it follows the animator instead. I tried removing the animation from the idle state, so theoretically there would be no animation playing when the idle state is active, and i also tried removing the keyframe from the idle animation, thinking that would work, but it didnt work either.
So, how can i still move the weapon to its swing starting point using code, even if there is an animation playing? Or just override what the animation is telling it to do. I could just script the swing animations but i would rather not.