Пример #1
0
        Dialog DoShowPopup(Controller controller)
        {
            Vector3 head_forward = controller.position - Baroque.GetHeadTransform().position;
            Vector3 fw           = controller.forward + head_forward.normalized;

            fw.y = 0;
            transform.forward  = fw;
            transform.position = controller.position + 0.15f * transform.forward;

            DisplayDialog();
            popupShown = this;
            popupCloseTriggerOutside = 1 << 16;
            return(this);
        }
Пример #2
0
        void ChangeLocation()
        {
            Transform camera_rig     = Baroque.GetSteamVRManager().transform;
            Transform steamvr_camera = Baroque.GetHeadTransform();
            Vector3   v = camera_rig.position + destination_position - steamvr_camera.position;

            v.y = destination_position.y;
            camera_rig.position = v;
            FadeToColor(Color.clear, 0.2f);
            if (onTeleported != null)
            {
                onTeleported.Invoke();
            }
        }