It looks like you're new here. If you want to get involved, click one of these buttons!
We've got a lot of weapons in our game and it'll be a hassle to make reload animations for everyone, especially when it's just minor differences between them. Is there a generic way I can map one animation to multiple weapons with IK?
You can create a weapon template prefab for the weapon and have a child object that contains the graphics of the weapon. Then you just need to create an animation for the weapon template prefab.
Well that's the thing, making animations for a lot of weapons is tedious especially when they're all similar. Attachments may also change how reloads should work, so how can I make a generic way to go about it?
I honestly don't believe there is a "generic" way. If each weapon has a unique part in reloading then be it, you can't help it because it is a "unique" part and you have to create this uniqueness yourself which will end up in an animation for each weapon.
Game design is tedious :p
I mean that's the thing, if I have a 2 rifles that reload in basically the same way, just the clip is further back, surely there must be a generic animation I can map to it?
I suppose you can store the clips position and then when you play the animation you set the IK hands position to the clip? Although you must be able to override an animations position with IK and I'm not sure if you can do that in Unity.
Im fairly certain if the armature structure you use is similar for each class of gun (pistol rifle lmg) etc you can create a base animation in blender, and map it to the the others.
On a pistol, if you have a bone on the handle, slide, trigger, and magazine, and every other pistol uses the same structure, you can map that animation to the others.
If this is a prototype, just make the gun tilt down off screen, and when it comes back up its reloaded. In the release version you can redo every animation.
Have a good one!