Say you have a Sniper gun, and an AK47. Both have different reload animations. So we would have to have two reload animations.
Would you model the gun with the hands? and animate it from there?
But then does that mean, that the hands would have to be a completely different object than the body?
Or do you model/animate the gun with the whole character?
Does this mean you would have to have 20 copies of your character if you want to have 20 guns?
But wait, the character also has running, crouching and melee animations. Does that mean having 60 different files?
There must be another way…
By the way, this is a FPS, but later I might make it online. So I can’t just have floating arms behind the camera, everything needs to be modeled.
Each gun would have it’s own animation for reload. including sections of the arms and hands which let you see it on the screen.
In script you would call a Coroutine that waits for the animation to finish before setting a flag stating that you can fire again. You can do this also with gun jams and stuff like that.
I don’t understand? Have a different set of hands, on top of my character, and add a layer so it’s only visible to the player?
and I already know how to do the animation coroutines and stuff. That wasn’t really part of my question =P
Wait, my answer is givin in the concept that you are running a FPS where you don’t see a body. This way, you guys build a set of hands on each gun, and run around with it. Swap guns, and you have a different set of hands that could control the gun totally differently then the previous set.
If you have a 3PS the concept of a full body with a different animation for reloading each gun is valid. Probably the best way to do it.
I know, but then that means If I have 20 guns, then I would still have to have 20 different animations for my character. an all those 20 different animations still have to have run, crouch, sprint, reload. Which means you will have to have around 100 animations just for a character. Which seems kind of impractical to me.
I was thinking have the character animated, but without arms. And have a different object (the arms, animated for the different weapons) and attach it to my armless character in unity.
Animation blending.
Also do not combine guns and hands. If you suddenly need to change hands model, it might become painful unless you’re really good at 3d and know all the referencing and instancing stuff.
I would animate arms and guns as separate models, then just play animation at the same time.
Totally not, If you have 20 special weapons, yes, but all handguns would use the same animations, all rifles that load the same.
To be honest all the big games like UT or Quake have only a limited number of guns, so they can get away with having different reload animations. Games like GTAIV have many guns, so they share animation cycles. The guns are never part of the original mesh, you just parent them to a hand, tell the animation sequences that he is carrying a rocket launcher and let the animation house a heavy weapon.
Animation blending is only part of it. You are still going to have to draw a character with a heavy weapon. You can’t just sling around a assault rifle like a hatchet.
Character animations are tedious. They take a lot of time to get right and a lot of sequences to make look right. Once you get a solid armature animation, you transpose that onto other models. It makes it easier in the end.
Thanks to all of you. Really helped me think this one through.
I’m basically mixing all the suggestions here.
and this is what I came up with just incase some one in the future has the same problem:
I will have a really basic reload animation for my character when some one sees him online.
However, I will have another set of hands but they will only be visible to the player that’s controlling the character. Those have really advanced animations. I think this would work best and would be less tedious. I would have to deal with animation blending much less, and in terms of networking it would also be a good choice because less data would have to be sent.
In online FPS’s like Halo, Unreal, etc., when in the first person perspective they usually have very customized animations for every single gun (crazy stuff flies off the gun, pistons pop open, clips pop out, hand slides a lever, hand pulls out a clip, pumps a shotgun, etc), but from the other player’s perspective in the multiplayer game, they just have one general animation where the character just fiddles around with his hands.
EDIT: sorry, just saw your last post; yup, that’s exactly what they do.
Hey you and some others might find these videos helpful, or at the very least interesting. The series of videos is sort of a video journal if you will on making a FPS game with Unity. I may add more in the future, as time permits. It’s actually a lot of work putting this together:
One thing to keep in mind though, don’t forget about your idle/aiming animations either (where the character has the weapon shouldered or whatever)… for instance, I had all my rifle weapons modeled all the while being mindful of the position of the character’s front hand, so that the bottom of the foregrip of ever gun fit nicely in the characters front hand – you don’t want there to be a gap with his hand floating in the air, nor do you want his hand clipping through the weapon. And you probably don’t want to have to make a different idle/aiming animation for every weapon just to move his hand slightly.