void BothhandsPush() { left_hand_move_checker_ = FindObjectOfType<LeftHandMoveChecker>(); right_hand_move_chacker_ = FindObjectOfType<RightHandMoveChecker>(); if (left_hand_move_checker_ == null || right_hand_move_chacker_ == null) return; Debug.Log(left_hand_move_checker_.HandMoveCheck().z); Debug.Log(right_hand_move_chacker_.HandMoveCheck().z); if (left_hand_move_checker_.HandMoveCheck().z == 1 && right_hand_move_chacker_.HandMoveCheck().z == 1) { transform.Translate(0, 0, 0.1f); } else if (left_hand_move_checker_.HandMoveCheck().z == -1 && right_hand_move_chacker_.HandMoveCheck().z == -1) { transform.Translate(0, 0, -0.1f); } if (left_hand_move_checker_.HandMoveCheck().x == 1 && right_hand_move_chacker_.HandMoveCheck().x == 1) { transform.Translate(0.1f, 0, 0); } else if (left_hand_move_checker_.HandMoveCheck().x == -1 && right_hand_move_chacker_.HandMoveCheck().x == -1) { transform.Translate(-0.1f, 0, 0); } }
void LeftOrRightHandCheck() { if (rigid_hand_.GetLeapHand().IsLeft) { left_hand_move_checker_ = GetComponent <LeftHandMoveChecker>(); right_hand_move_checker_ = GetComponent <RightHandMoveChecker>(); left_hand_move_checker_.enabled = true; right_hand_move_checker_.enabled = false; } else if (rigid_hand_.GetLeapHand().IsRight) { left_hand_move_checker_ = GetComponent <LeftHandMoveChecker>(); right_hand_move_checker_ = GetComponent <RightHandMoveChecker>(); left_hand_move_checker_.enabled = false; right_hand_move_checker_.enabled = true; } }
void LeftOrRightHandCheck() { if (rigid_hand_.GetLeapHand().IsLeft) { left_hand_move_checker_ = GetComponent<LeftHandMoveChecker>(); right_hand_move_checker_ = GetComponent<RightHandMoveChecker>(); left_hand_move_checker_.enabled = true; right_hand_move_checker_.enabled = false; } else if(rigid_hand_.GetLeapHand().IsRight) { left_hand_move_checker_ = GetComponent<LeftHandMoveChecker>(); right_hand_move_checker_ = GetComponent<RightHandMoveChecker>(); left_hand_move_checker_.enabled = false; right_hand_move_checker_.enabled = true; } }
void BothhandsPush() { left_hand_move_checker_ = FindObjectOfType <LeftHandMoveChecker>(); right_hand_move_chacker_ = FindObjectOfType <RightHandMoveChecker>(); if (left_hand_move_checker_ == null || right_hand_move_chacker_ == null) { return; } Debug.Log(left_hand_move_checker_.HandMoveCheck().z); Debug.Log(right_hand_move_chacker_.HandMoveCheck().z); if (left_hand_move_checker_.HandMoveCheck().z == 1 && right_hand_move_chacker_.HandMoveCheck().z == 1) { transform.Translate(0, 0, 0.1f); } else if (left_hand_move_checker_.HandMoveCheck().z == -1 && right_hand_move_chacker_.HandMoveCheck().z == -1) { transform.Translate(0, 0, -0.1f); } if (left_hand_move_checker_.HandMoveCheck().x == 1 && right_hand_move_chacker_.HandMoveCheck().x == 1) { transform.Translate(0.1f, 0, 0); } else if (left_hand_move_checker_.HandMoveCheck().x == -1 && right_hand_move_chacker_.HandMoveCheck().x == -1) { transform.Translate(-0.1f, 0, 0); } }
void Start() { rigid_hand_ = GetComponent <RigidHand>(); left_hand_move_checker_ = GetComponent <LeftHandMoveChecker>(); right_hand_move_checker_ = GetComponent <RightHandMoveChecker>(); }
void Start() { left_hand_move_checker_ = FindObjectOfType<LeftHandMoveChecker>(); right_hand_move_chacker_ = FindObjectOfType<RightHandMoveChecker>(); }
void Start() { left_hand_move_checker_ = FindObjectOfType <LeftHandMoveChecker>(); right_hand_move_chacker_ = FindObjectOfType <RightHandMoveChecker>(); }
void Start() { rigid_hand_ = GetComponent<RigidHand>(); left_hand_move_checker_ = GetComponent<LeftHandMoveChecker>(); right_hand_move_checker_ = GetComponent<RightHandMoveChecker>(); }