GetJointPosition() публичный Метод

public GetJointPosition ( int joint ) : Vector3
joint int
Результат Vector3
Пример #1
0
    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;
            }
        }
    }