Exemple #1
0
        // Update is called once per frame
        void Update()
        {
            Ray ray = new Ray(transform.position, transform.forward);
            Tuple <Ray, RaycastHit> hit = PortalUtils.TeleportableRaycast(ray, 100, ~0, QueryTriggerInteraction.Ignore);

            Debug.Log(hit);
        }
Exemple #2
0
        // Update is called once per frame
        new void Update()
        {
            base.Update();
            try {
                device = SteamVR_Controller.Input((int)trackedObj.index);
            } catch (System.IndexOutOfRangeException) {
                return;
            }

            if (device.GetPress(SteamVR_Controller.ButtonMask.Trigger))
            {
                Ray ray = new Ray(transform.position, transform.forward);
                Tuple <Ray, RaycastHit> hit = PortalUtils.TeleportableRaycast(ray, 100, ~0, QueryTriggerInteraction.Ignore);
                Debug.Log(hit);
            }
        }