Hello guys,
Now, I'm using Leapmotion + Unity with C#.
I'm planing to make some game by using PinchingSandbox that is a scenes of Leapmotion package.
I can use PinchingSandbox itself.
I would like to modify joint angles of hand graphics model and hand physics model when pinching.
Concretely, I would like to adjust the extent of hand closing when pinching by using gain or amplitude.
For example, in case that I set gain=2, when I move each joint of my index finger 1 degree, each joint of a index finger of hand graphics model and hand physics model are moved 2 degrees.
Something like that.
I had modified UpdateHandModels function of HandController.cs as follow:
float val = hand_model.fingers[1].GetFingerJointStretchMecanim(0);
hand_model.fingers[1].bones[1].localRotation = Quaternion.AngleAxis(val * 10.0f, Vector3.right);
hand_model.UpdateHand();
I thought that the base of index finger moved 10 times larger than the actual finger, but nothing was happened.
Do you know how to modify codes(HandController.cs, RigidHand.cs, or so on)?