I have a problem in my game where the left sided meleeing animations get pushed to the right instead of pushing forward to the left as they should. The reason for this is because the sprite sheet frames are extracted with their x,y locations at the top left and LibGDX TextureRegions have their origin at the top left. This means that if the current frame in an animation has a greater width than the previous frame, then the current frame looks as if it gets pushed to the right, because it is drawn from the top left.
This video shows the problem with the meleeing left animation. As you can see, because each frame has its origin at the top left, the character looks as though it is getting pushed back when it throws a punch.
This shows the meleeing right animation. Since the origin is the top left, this looks natural. This is how I want the left sided animations to look, only in the opposite direction.
[media]https:
The animation speeds have been slowed down to help you see the problem more clearly. In the game they would be faster.
I haven't been able to find a way to change the origin in the API. What can I do to fix this?