Best approach for animation of a 2d Charcter

Hi All

This is my first post but I’m sure it won’t be my last.

I’m busy working on a 2d side scroller and am making use of sprite sheets for my animations, I have run into a foreseeable problem where my character will be fighting with multiple weapons and redoing each movement sprite sheet with each weapon drawn could work out to be quite a lengthy process.

So I was wondering is it possible to simply add the different weapons to the characters hand and have just the weapon change every time. So all the animations are created without weapons even the weapon specific animations and just have the different weapons scripted to be in his hand and have there own separate animations.

I’ve tried to look for tutorials pertaining to this but can’t find any. Is this even possible or should I just create each sprite sheet with each weapon?

Thank you for your help

I’ve also been wondering about this. Also wondering with other animation programs like Spine, Spriter or unity assets like puppet2D work with issues like this too.

Just add a child weapon GameObject to the player GameObject. The player GO does the attack animation (the animation frames you have already drawn) and the weapon GO does the weapon animation. You can swap out axe, sword etc. Of course any 2-handed weapon would require specialized 2-handed attack animations on the player GO as well. I am not sure how well they’d sync with the Animator but probably can tweak it to work. Maybe make transparent frames for barehanded and have the animator animate both the player and weapon GameObjects at same time for all attacks if possible.

Spine.

child sprites gameObjects in same animation?

This looks like it could work for me. Could you change any of the child sprites in script? If so, how? I’ve been searching for a solution similar to this for a while now.

yes, please check out this thread… i posed my code and someone recomended a possible better alternative