public void InteractWithNearesObject() { //we have something grabbe we should no interact if (currentGrab != null) { return; } SetDefaultInteractAnimation(); //get the near interact object to this controller VR_Interactable interact = FindNearInteract(); if (interact == null && activeDistanceGrabbable != null && (activeDistanceGrabbable != otherController.activeDistanceGrabbable || !ThereIsNearbyControllerInteraction(activeDistanceGrabbable))) { interact = activeDistanceGrabbable as VR_Interactable; } if (interact != null && interact.enabled && interact.CanInteractUsingController(this)) { VR_HandInteractSettings settings = interact.GetHandInteractionSettings(this); ProcessInteractSettings(settings); ProcessInteraction(interact); } }
public bool CanHighlightUsingController(VR_Controller controller) { return(interact == null || interact.CanInteractUsingController(controller)); }