public GetJointPosition ( int joint ) : Vector3 | ||
joint | int | |
return | Vector3 |
void Update() { if (leap_hand == null) { return; } Vector3 centroid = GetCentroidFingers(); if (command == CommandGesture.NULL) { if (isComandGrab(centroid, JoyConfig.Config.DistanceGrab)) { command = CommandGesture.Grab; } } else { switch (command) { case CommandGesture.Grab: if (!isComandGrab(centroid, JoyConfig.Config.DistanceRelease)) { command = CommandGesture.NULL; MoveTool.MoveHome(); } else { Tool.transform.rotation = hand_model.GetPalmRotation(); FingerModel midle = hand_model.fingers[2]; MoveTool.MoveTo(midle.GetJointPosition(1)); } break; default: break; } } }