Hi,
We have characters controlled with inversed kinimatics and animation. We have several characters with their own bone definition and avatar. We have items in the world (weapons, etc) that the player can pickup, for each item we need to rig the hand and fingers so that they sync to the item you hold. Somehow we want to define this rigging on an item level and we want to be able to use the rigging for all our character/bone rigs.
is this possible? Thanks
Sounds like you have experience with character setup.
From my limited experience the gun will need to be transform masked so the rest of the rig can receive retargeted animations via humanoid rig.
As long as the characters are setup for humanoid this is doable however if the characters size vary a lot you might have to add custom keys to the ik info when swapping between guns.
Idea - Would placing/parenting null game objects to the weapons where you want all characters hands to be placed help locking the ik targets to the correct position on each gun?
Just a thought - Im about a week or two away from digging into the ik system in depth.
Yes we have empty child objects on the guns to define were we want to sync gun to ik. That part is fixed, but its the part about finger angles that I need to fix
When you say finger angle - are you talking about the characters grip on different sized weapons?
Yep, exactly. I want to confugre the fingers (grip) for each item that can be picked up. But I want to be independant on which character that is holding the item
OK cool
I have not performed this process - so it’s only speculative here.
Can mecanim play an animation only half way and stop and hold at a specific frame? I’m sure it can somehow using code bits. http://answers.unity3d.com/questions/48077/pausing-an-animation.html
If so - I think creating 2 extra animations for each hand could solve this.
One animation with the fingers animating from relaxed straight pose to cupped, and one animating the thumb from relaxed normal position (forming a curved L shape with the index finger) to the position where
the thumb is curled over the fingers.
Then ‘theoretically’ these two animations could allow each character to grip any size weapon, but you’d have to stop both animations in the middle, for instance when the grip on one weapon is larger than the grip on another weapon.
These animations would be available for all characters using the humanoid rig setup.
Then using code (I’m a non-coding artist) for each weapon - control the amount of grip animation is played per weapon. This would be similar to the setup for controlling which ‘draw’ weapon animation is played based on which weapon is drawn. Since different weapons have different draw animations(shotgun vs pistol), each weapon could also have different grip settings on the grip animation.
Hmm, will look into that, good ideas
I wish some expert on mecanim just came in here and told us how the best practice way is
Anyway, this is how it looks without finger rigged
1 Like
I have solved it, in runtime I pose the fingers using rotation only i then copy the hand bone structure to a clone object. I move this clone to the pickuupable item, i then create a script that each frame rotates the fingers to the clone bone definition on the picked up object
2 Likes
Awesome! Glad you figured this out. Sounds a bit complicated to my animator ears, though. I definitely would have just made a pose for each gun. But yours sounds pretty robust.
The gameplay video of co-op loading a gun made me chuckle. Is that going to be a legit gameplay tactic?
As for Mecanim expert, I don’t know any. Be sure to introduce me if you meet one XD
That stuff is wonky.
1 Like
You could call my solution a pose for each gun, but on a more programmatic level i guess. The coop loading of the gun is just a side effect of our advanced system for synking items over the network. 
edit. A more common scenario is probably a teammate throwing you a mag when you are out of it 
1 Like
Sounds cool. Would be hilarious if there were a mode where you couldn’t load your own gun.
1 Like
Got a like on the clip above, can bump the thread with how the grip handling looks today. This is in first person but same grips are just for third person
3 Likes