// Start is called before the first frame update void Awake() { _grabObjController = gameObject.GetComponent <GrabObjController>(); _forceManipulation = gameObject.GetComponent <ForceManipulation>(); _forceGesture = gameObject.GetComponent <ForceGestureHand>(); _climbHand = gameObject.GetComponent <ClimbHand>(); HandSource = _grabObjController.HandSource; }
public bool IsGrabbing(GrabObjController _hand) { if (_mainHandGrab == _hand || _offHandGrab == _hand || _mainHandClimb == _hand) { return(true); } else { return(false); } }
public void UngrabMe(GrabObjController _hand, ClimbController _climbController = null) { if (Climbable) { _mainHandClimb = null; _climbController.DropHand(_hand.gameObject); return; } if (_mainHandGrab == _hand) { _mainHandGrab = null; } if (_offHandGrab == _hand) { _offHandGrab = null; } }
public void GrabMe(GrabObjController _hand, ClimbController _climbController = null) { if (Climbable) { _mainHandClimb = _hand; _climbController.StartClimbObject(_hand.gameObject); return; } if (!PickupAble) { return; } if (!_mainHandGrab) { _mainHandGrab = _hand; } else { _offHandGrab = _hand; } }