Пример #1
0
        private void OnUseStartVoid(object sender, InteractableObjectEventArgs interactableObjectEventArgs)
        {
            var context = new UsingContext {
                GameObject = _vio.GetUsingObject()
            };

            _useStart?.OnUseStart(context);
        }
        protected override void CheckStopTouching()
        {
            if (touchedObject != null)
            {
                VRTK_InteractableObject touchedObjectScript = touchedObject.GetComponent <VRTK_InteractableObject>();

                //If it's being grabbed by the current touching object then it hasn't stopped being touched.
                //if (touchedObjectScript != null && touchedObjectScript.GetGrabbingObject() != gameObject)
                //{
                //    StopTouching(touchedObject);
                //}
                if (touchedObjectScript != null && touchedObjectScript.GetUsingObject() != gameObject)
                {
                    StopTouching(touchedObject);
                }
            }
        }