GetFingerJointStretchMecanim() public method

public GetFingerJointStretchMecanim ( int joint_type ) : float
joint_type int
return float
Exemplo n.º 1
0
    private void CheckGestures()
    {
        //This method checks if the trigger is pressed to to dath the angles of the index finger are analyzed
        FingerModel finger = hand_model.fingers[1];
        float       f2     = finger.GetFingerJointStretchMecanim(1);

        //Debug.Log("f1 "+f1+" f2 "+f2+" f3 "+f3);
        //78.0 limit value.

        if (f2 < -78.0f & ready_to_shoot)
        {
            Debug.Log("Shooting");
            ready_to_shoot = false;
            FireArm arm = fire_arms[0].GetComponent <FireArm>();
            arm.TriggerFire();
        }

        if (f2 > -68.0f)
        {
            ReadyToShoot();
        }
    }