How would i go about reloading animations?

Hi All,

I’ve gotten to the point in my game where i’m starting to expand upon my weapons, doing stuff like updating models, texturing them, and animating them. It’s with this animation that i have a question to ask. I’ve gotten animations such as moving bolts and stuff in pretty easily, but i’ve been struggling to think of how i might do a reloading animation. The 2 options that i’ve thought of are as follows:

A) Animate the movement of the magazine alongside the movement of the player, syncing the two together, and then exporting the animations separately. What i mean by this is that the gun would be it’s own skeleton, and the magazine would ‘float’ alongside the hand, and then ‘float’ back to it’s default position.

B) Have the magazine of the gun be a separate mesh, which would be attached to the gun when loaded, and then, at the right frame, be attached to the hand bone of the player, then to be attached back to the gun when the players hand moves back to the gun.

I’m wondering what the downsides are to both of them, or if there’s an even better, clearer and cleaner option that everyone uses that i just don’t know yet.

Thanks a lot in advance :slight_smile:

-Lukas

Of the two, I would use the second one. I think it’s better to have the magazine attached to a bone of the player character. Because if you change animation of reloading, you’ll only have to change the character animation, and not the gun and magazine’s animation as well.

There are other options as well. You could have two places where the magazine mesh would be attached, and just toggle its visibility. Magazines would be two separate meshes that are always connected: one to the gun mesh and the other to the character hand bone. When the character takes hold of, or comes into a certain frame of animation, the gun-magazine would become invisible. At that same moment, have the hand-magazine in the player’s have become visible. Reverse the process for when the magazine is returned.

I’m sorry but I can’t offer any insight into performance aspects of the approaches.