I have this animation I’ve made which is an arm moving from above some guy’s head to the centre of his body. The distance from the edge of the arm to the mid point of the guy’s body is the radius of a circle, so the distance is exactly the same whether the guy’s arm is to his right, left, up, and in addition, the animation is exactly the same no matter what direction the arm is coming from to the center. If there were just 4 attack directions, I know I could just make the 4 different animation, but in my game, there are infinite directions the arm could extend in because the user swipes and the arm extends in that exact direction.
No matter what direction the arm is extended in, the same animation works just at a different angle (the animation was made with the guy’s arm directly above his head).
I can calculate the angle at which the arm is extended, but how can I play an animation at this angle, if you know what I mean?
well, if you set the rotation of the first sprite of the animation, the entire array of frames will be tilted, as this example from one of my games :
i just tested this, it tilts the entire animation by 22 degrees.