I have a rapid fire weapon that I made in blender, along with a FPS mesh and rig. I'm currently at the stage when I'm creating animations (idle, aim, etc), and had this question: Should recoil be an animation or script?. I decided to go with scripted recoil as originally planned, but see one potential problem going this route that I don't know how to solve.
If I were to use scripted recoil, how do I keep the hands on the gun?
The rig in blender is as follows:
An "arms mesh" (consists of the left and right arm)
An "FPS armature" (Typical rig for an arms only armature, upper hand bone, lower hand bone, fingers, etc)
An rifle mesh (broken down into different parts, ie, barrel, body, stock, magazine, etc)
A rifle armature (gun bone, magazine bone)
A "weapon holder" empty
The FPS armature has Inverse Kinematics on the bone that controls the palm/hand area of the mesh. The weapon holder has a child of constraint that makes it a child of the "hand bone". The "gun bone" on the rifle armature, has a child of constraint that makes it a child of the "weapon holder". The left hand Inverse Kinematic target also has a child of constraint that makes it a child of the weapon holder, so that the left hand follow the barrel of the gun.
The FPS armature has different animations like an idle animation, weapon draw animation, etc. I'm also considering adding a "fire animation", since I figured I'd need an animation where there is no hand movement at all so that I can have the gun be steady while the recoil script rotates the gun over in unity.
The only animation the gun would have is the reload animation where the magazine floats out of the gun and goes back in.
I plan to export the gun and FPS armature separately into unity, and have this weapon, along with a few others I created, be a child of the hands.
Is there any way I can keep the hands on the weapon when I have scripted recoil in Unity?
I haven't actually encountered the problem yet, since I'm still making the animations, but going the route I'm taking, I'm fairly sure I'm going to come across it later on. Since I'm still at the early stages, if anyone has critique or advice on how I set my rig and stuff, I can still change it, so any input is apreciated.