コード例 #1
0
ファイル: Lasso.cs プロジェクト: talothman/Constructs
    private GameObject GetGrabbableObject()
    {
        GameObject obj = interactTouch.GetTouchedObject();

        if (obj != null && interactTouch.IsObjectInteractable(obj))
        {
            return(obj);
        }
        return(null);
        //return grabbedObject;
    }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 private bool IsObjectUsable(GameObject obj)
 {
     return(interactTouch.IsObjectInteractable(obj) && obj.GetComponent <VRTK_InteractableObject>().isUsable);
 }
コード例 #4
0
        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()));
        }