private GameObject GetGrabbableObject() { GameObject obj = interactTouch.GetTouchedObject(); if (obj != null && interactTouch.IsObjectInteractable(obj)) { return(obj); } return(null); //return grabbedObject; }
void doTouch() { var go = Fsm.GetOwnerDefaultTarget(gameObject); if (go == null) { return; } touchedObject.Value = touch.GetTouchedObject(); if (touchedObject.Value == null) { isTouching.Value = false; isInteractable.Value = false; } else { isTouching.Value = true; isInteractable.Value = touch.IsObjectInteractable(touchedObject.Value); } }
private bool IsObjectUsable(GameObject obj) { return(interactTouch.IsObjectInteractable(obj) && obj.GetComponent <VRTK_InteractableObject>().isUsable); }
protected virtual bool IsObjectUsable(GameObject obj) { VRTK_InteractableObject objScript = obj.GetComponent <VRTK_InteractableObject>(); return(interactTongTouch != null && interactTongTouch.IsObjectInteractable(obj) && objScript != null && (objScript.isUsable || objScript.PerformSecondaryAction())); }