- Home /
How do i match hand positions when playing hand shake animation?
Hi, I recently started development using Unity. I have a simple scenario of two persons walking towards each other and shaking hands. I was able to make the characters walk to each other using NavMeshAgent, stopping and then shaking hands. But many times, hands don't match positions or animations do not sync. Any information about synchronizing the animation start times and matching two hands would be greatly appreciated. Thanks in advance.
You can use Inverse $$anonymous$$inematics to position the hands so they touch. I believe Unity's built-in I$$anonymous$$ system has an example that can be adapted. Synchronizing animation start dates is just a matter of setting a bool to true once one of the characters has assumed the correct position (facing the other one), and then the other one just needs to check if that bool is true once he is also in the right position, and if yes, both start their animations.
Thank you for the reply, Cherno. I was getting myself familiar about the I$$anonymous$$ system. I will try to apply it the current scenario.
Answer by tsrtsr02 · Feb 01, 2016 at 05:12 PM
I was able to get it working by using animation events and IK. During the hand shake animation, at appropriate places I am raising events and at those events I am using IK to match one player's hand with another player's hand for a brief moment. Hope this is how it should be done.
Your answer
Follow this Question
Related Questions
Network rotation is laggy and slow 2 Answers
Unity + PHP networking movement sync 0 Answers
Prefab bullet affected by gravity when it shouldnt? 1 Answer