2D Pixel Sprites and Weapons

Hello,

I have a 2D pixel sprite that I want to hold a weapon and swing it.

Should I animate the sword-swinging for each frame so it matches up with my character? Or is there a scalable way to add some sort of “bone” or target point on a sprite image, and then I can add a bone to the weapon too, and I can automatically attach the weapon bone-to-bone, and also have control over the rotation of the weapon?

Thanks

I’m still learning my way through the 2D animation process, but I’ve done things in different ways. One way I did it for a project was to make a gameobject for the weapon and then connect it to the player’s character with a hinge joint, and have the weapon turn and follow my mouse within an arc.

The other way I’m trying it out is by disconnecting the player character’s animations from the weapon hitbox; since there’s only one attack animation, I just have a collider hitbox that is enabled/disabled when the attack button is held down. Since the sprite’s animation is the same each time, I figure I don’t need the weapon’s collider to be any more complex than that.

I don’t know if these methods are best practices though.

depends on what you want, if you use bones it wont look like a pixel art animation, thats not bad just your choice