private void Start()
        {
            isTransitioning = false;
            isFaded         = false;

            Utilities.AddCameraFade();
            if (!VRTK_SDK_Bridge.HasHeadsetFade(gameObject))
            {
                Debug.LogWarning("This 'VRTK_HeadsetCollisionFade' script needs a compatible fade script on the camera eye.");
            }
        }
        private void Start()
        {
            headset         = VRTK_DeviceFinder.HeadsetTransform();
            isTransitioning = false;
            isFaded         = false;

            Utilities.AddCameraFade();
            if (!VRTK_SDK_Bridge.HasHeadsetFade(headset.gameObject))
            {
                Debug.LogWarning("This 'VRTK_HeadsetFade' script needs a compatible fade script on the camera game object.");
            }
        }
Example #3
0
        protected virtual void Start()
        {
            headset         = VRTK_DeviceFinder.HeadsetTransform();
            isTransitioning = false;
            isFaded         = false;

            VRTK_SharedMethods.AddCameraFade();
            if (!VRTK_SDK_Bridge.HasHeadsetFade(headset))
            {
                Debug.LogWarning("This 'VRTK_HeadsetFade' script needs a compatible fade script on the camera game object.");
            }
        }
Example #4
0
        protected virtual void OnEnable()
        {
            headset         = VRTK_DeviceFinder.HeadsetCamera();
            isTransitioning = false;
            isFaded         = false;

            VRTK_SharedMethods.AddCameraFade();
            if (!VRTK_SDK_Bridge.HasHeadsetFade(headset))
            {
                VRTK_Logger.Warn(VRTK_Logger.GetCommonMessage(VRTK_Logger.CommonMessageKeys.REQUIRED_COMPONENT_MISSING_FROM_GAMEOBJECT, "VRTK_HeadsetFade", "compatible fade", "Camera"));
            }
        }
Example #5
0
        private void Start()
        {
            Utilities.AddCameraFade();
            if (!VRTK_SDK_Bridge.HasHeadsetFade(gameObject))
            {
                Debug.LogWarning("This 'VRTK_HeadsetCollisionFade' script needs a compatible fade script on the camera eye.");
            }

            Utilities.SetPlayerObject(gameObject, VRTK_PlayerObject.ObjectTypes.Headset);

            BoxCollider collider = gameObject.AddComponent <BoxCollider>();

            collider.isTrigger = true;
            collider.size      = new Vector3(0.1f, 0.1f, 0.1f);

            Rigidbody rb = gameObject.AddComponent <Rigidbody>();

            rb.isKinematic = true;
            rb.useGravity  = false;
        }