GetWristPosition() public méthode

public GetWristPosition ( ) : Vector3
Résultat Vector3
Exemple #1
0
    private void DrawDebugLines()
    {
        HandModel hand = GetComponent <HandModel>();

        Debug.DrawLine(hand.GetElbowPosition(), hand.GetWristPosition(), Color.red);
        Debug.DrawLine(hand.GetWristPosition(), hand.GetPalmPosition(), Color.white);
        Debug.DrawLine(hand.GetPalmPosition(),
                       hand.GetPalmPosition() + hand.GetPalmNormal(), Color.black);
        Debug.Log(Vector3.Dot(hand.GetPalmDirection(), hand.GetPalmNormal()));
    }
 // Update is called once per frame
 void Update()
 {
     if (hand_L.IsTracked && lHand_status == 1)
     {
         palmL_position = hand_L.GetWristPosition();
         //Vector3 temp = hand_L.GetPalmRotation() * colab;
         Vector3 temp = leap_camera.transform.rotation * colab;
         transform.position = palmL_position + temp;
         transform.rotation = leap_camera.transform.rotation;
     }
     else if (lHand_status == 2)
     {
         //do nothing
     }
     else if (lHand_status == 0)
     {
         transform.position = initial_position;
     }
 }