Exemplo n.º 1
0
        public override void OnEnter()
        {
            var go = Fsm.GetOwnerDefaultTarget(gameObject);

            theScript = go.GetComponent <VRTK.VRTK_HeadsetCollisionFade>();

            if (!everyFrame.Value)
            {
                MakeItSo();
                Finish();
            }
        }
Exemplo n.º 2
0
        private void Awake()
        {
            // Required Component: VRTK_PlayerPresence
            playerPresence = GetComponent <VRTK_PlayerPresence>();
            if (useGravity)
            {
                if (!playerPresence)
                {
                    playerPresence = gameObject.AddComponent <VRTK_PlayerPresence>();
                }

                playerPresence.SetFallingPhysicsOnlyParams(true);
            }

            headCamera    = VRTK_DeviceFinder.HeadsetTransform();
            collisionFade = headCamera.GetComponent <VRTK_HeadsetCollisionFade>();
            if (collisionFade == null)
            {
                collisionFade = headCamera.gameObject.AddComponent <VRTK_HeadsetCollisionFade>();
            }
        }