I am trying to create a physical UI and want to make my hand automatically go into the pointing position where a rigidbody is added. I see that when the "Flex" parameter from the animator is 1.0f and the others are not affected, the hand can interact with physical elements. For the simplicitiy of the user, I want the hand to flex into a pointing position automatically when he is near a physical UI, instead of having to press the grip button.
In Star Wars Vader Immortal series I really liked that the grip button fingers was gradually squeezing together, when moving the hand closer to a button.
I am using Unity version 2018.4.8f1 together with Oculus 1.38.4 and VRTK. I have a pinpad with buttons that use the directional joint drive from VRTK. I am kind of new to Unity and the animator, since I am doing a project for my master thesis, but what I want to do is create a zone near the pinpad and a script that automatically makes the hand go into this "state".
The pictures below shows what I want to do when the hand is near the physical UI.