Ejemplo n.º 1
0
        private void AddTrackPoint(GameObject currentGrabbingObject)
        {
            var grabScript      = currentGrabbingObject.GetComponent <VRTK_InteractGrab>();
            var controllerPoint = ((grabScript && grabScript.controllerAttachPoint) ? grabScript.controllerAttachPoint.transform : currentGrabbingObject.transform);

            if (grabAttachMechanicScript)
            {
                trackPoint = grabAttachMechanicScript.CreateTrackPoint(controllerPoint, gameObject, currentGrabbingObject, ref customTrackPoint);
            }
        }
        protected virtual void AddTrackPoint(GameObject currentGrabbingObject)
        {
            VRTK_InteractGrab grabScript      = currentGrabbingObject.GetComponent <VRTK_InteractGrab>();
            Transform         controllerPoint = ((grabScript && grabScript.controllerAttachPoint) ? grabScript.controllerAttachPoint.transform : currentGrabbingObject.transform);

            if (grabAttachMechanicScript != null)
            {
                trackPoint = grabAttachMechanicScript.CreateTrackPoint(controllerPoint, gameObject, currentGrabbingObject, ref customTrackPoint);
            }
        }