- Home /
Finger rotation (flex) to perform grasp and release action
i have a virtual hand model, and i wish to rotate the finger joint to perform a grasping action.
i have use code below to achieve to rotation.
TDistal.transform.rotation = Quaternion.Slerp(TDistal.transform.rotation, QuaTDistalRotationY, Time.deltaTime*1.5f);
That is my finger starting Y rotation value is 10 and after grasping is 306
when grasping the hand Y value is decrease: 10 -> 5-> 0-> 350->...->306
When releasing the hand Y value is also decrease: 306-> 300-> 270->...->30->10
however the releasing value above make the releasing action look odd and wrong.
The releasing hand Y value should like this: 306->...->350-> 0-> 5-> 10. How i can make the Y value is increase when perform releasing action?
I hope i can solve it with Quaternion.Slerp() function.
Thanks you in advice.