Example #1
0
    // Token: 0x0600630E RID: 25358 RVA: 0x00233D58 File Offset: 0x00232158
    public void SetHeight()
    {
        Text  componentInChildren = this.setHeightButton.GetComponentInChildren <Text>();
        float num = VRCTrackingManager.MeasurePlayerHeight();

        componentInChildren.text = string.Format("Player Height: {0:F2} m", num);
    }
Example #2
0
        public static void DeviceChanged()
        {
            var isInVR = VRCTrackingManager.IsInVRMode();
            var model  = UnityEngine.XR.XRDevice.model;

            if (isInVR)
            {
                if (model.ToLower().Contains("oculus") || model.ToLower().Contains("rift"))
                {
                    presence.smallImageKey  = "headset_rift";
                    presence.smallImageText = "Oculus Rift";
                }
                else if (model.ToLower().Contains("htc") || model.ToLower().Contains("vive"))
                {
                    presence.smallImageKey  = "headset_vive";
                    presence.smallImageText = "HTC Vive";
                }
                else
                {
                    presence.smallImageKey  = "headset_generic";
                    presence.smallImageText = "VR Headset";
                }
            }
            else
            {
                presence.smallImageKey  = "desktop";
                presence.smallImageText = "Desktop";
            }
            VRCModLogger.Log("[DiscordManager.DeviceChanged] isInVR: " + isInVR + " Model: " + model);
        }
Example #3
0
    // Token: 0x06004954 RID: 18772 RVA: 0x00187D1C File Offset: 0x0018611C
    protected Rect MakeCenterRect()
    {
        float num  = (float)((!VRCTrackingManager.IsInVRMode()) ? (Screen.width * 7 / 8) : (Screen.width / 2));
        float num2 = (float)((!VRCTrackingManager.IsInVRMode()) ? (Screen.height * 7 / 8) : (Screen.height / 2));

        return(new Rect((float)(Screen.width / 2) - num / 2f, (float)(Screen.height / 2) - num2 / 2f, num, num2));
    }
Example #4
0
    // Token: 0x060051C2 RID: 20930 RVA: 0x001C0444 File Offset: 0x001BE844
    private void UpdateLocomotionFromController(out Vector3 desiredMove, out Quaternion desiredRotate)
    {
        float heightBasedMotionScale = this.GetHeightBasedMotionScale();
        float d    = this.runSpeed * heightBasedMotionScale;
        float num  = this.inAxisVertical.axis;
        float num2 = this.inAxisHorizontal.axis;

        LocomotionInputController.navigationCursorActive = false;
        if (Mathf.Abs(num) < 0.1f)
        {
            num = 0f;
        }
        if (Mathf.Abs(num2) < 0.1f)
        {
            num2 = 0f;
        }
        if (num != 0f || num2 != 0f)
        {
            Transform trackedTransform = VRCTrackingManager.GetTrackedTransform(VRCTracking.ID.Hmd);
            Vector3   normalized       = Vector3.ProjectOnPlane(trackedTransform.forward, Vector3.up).normalized;
            Vector3   normalized2      = Vector3.ProjectOnPlane(trackedTransform.right, Vector3.up).normalized;
            desiredMove   = normalized * d * num + normalized2 * d * num2;
            desiredRotate = Quaternion.LookRotation(desiredMove, Vector3.up);
            this.linked   = false;
        }
        else
        {
            this.linked   = true;
            desiredMove   = Vector3.zero;
            desiredRotate = base.transform.rotation;
        }
    }
    // Token: 0x060051B6 RID: 20918 RVA: 0x001BF258 File Offset: 0x001BD658
    protected virtual void UpdateIntraFrameMotion()
    {
        Vector3    playerWorldMotion   = base.transform.position - InputStateController.lastPosition;
        Quaternion playerWorldRotation = Quaternion.Inverse(InputStateController.lastRotation) * base.transform.rotation;

        VRCTrackingManager.ApplyPlayerMotion(playerWorldMotion, playerWorldRotation);
    }
Example #6
0
File: Main.cs Project: VRCMG/ml_lme
        void ApplyAdjustment(ref Vector3 pos, ref Quaternion rot)
        {
            if (m_vr)
            {
                pos.x *= -1f;
                Swap(ref pos.y, ref pos.z);
                rot = c_hmdRotationFix * rot;
            }

            // Easy way to scale, but can be improved (but how?)
            var l_height = VRCTrackingManager.Method_Public_Static_Single_0();

            pos += m_rootOffset;
            if (!m_useHeadRoot)
            {
                if (m_vr)
                {
                    pos.y += m_rootOffset.y;
                    pos.z -= m_rootOffset.z;
                }
                pos   *= l_height;
                pos.y -= (l_height - VRCTrackingManager.Method_Public_Static_Single_4());
            }
            else
            {
                pos.y -= m_rootOffset.y * (m_vr ? 1f : 2f);
                if (m_vr)
                {
                    pos.z -= m_rootOffset.z * 2f;
                }
                pos *= l_height;
            }
        }
Example #7
0
 // Token: 0x060056CD RID: 22221 RVA: 0x001DDC34 File Offset: 0x001DC034
 public static bool SetSeatedPlayMode(bool seated)
 {
     if (seated && VRCTrackingManager.instance.ik != null && VRCTrackingManager.instance.ik.HasLowerBodyTracking)
     {
         return(false);
     }
     if (VRCTrackingManager.IsInVRMode())
     {
         using (List <VRCTracking> .Enumerator enumerator = VRCTrackingManager.instance.activeTrackers.GetEnumerator())
         {
             if (enumerator.MoveNext())
             {
                 VRCTracking vrctracking = enumerator.Current;
                 vrctracking.SeatedPlay = seated;
                 if (VRCTrackingManager.InSeatedPlay != vrctracking.SeatedPlay)
                 {
                     VRCTrackingManager.InSeatedPlay = vrctracking.SeatedPlay;
                 }
                 return(VRCTrackingManager.InSeatedPlay);
             }
         }
         return(true);
     }
     return(true);
 }
Example #8
0
 // Token: 0x060055A9 RID: 21929 RVA: 0x001D8760 File Offset: 0x001D6B60
 protected void UpdateSitMode()
 {
     if (this.GetSitMode() && HMDManager.IsHmdDetected())
     {
         float num = VRCTrackingManager.GetAvatarEyeHeight() / VRCTrackingManager.GetTrackingScale();
         float y   = this.GetLocalCameraPos().y;
         if (y - num > 0.3048f)
         {
             if (this._playerStandUpStartTime < 0f)
             {
                 this._playerStandUpStartTime = Time.realtimeSinceStartup;
             }
             if (Time.realtimeSinceStartup - this._playerStandUpStartTime > 2f)
             {
                 VRCTrackingManager.SetSeatedPlayMode(false);
                 QuickMenu.Instance.RefreshSitButton();
                 this._playerStandUpStartTime = -1f;
             }
         }
         else if (this._playerStandUpStartTime >= 0f)
         {
             this._playerStandUpStartTime = -1f;
         }
     }
     else if (this._playerStandUpStartTime >= 0f)
     {
         this._playerStandUpStartTime = -1f;
     }
 }
Example #9
0
 // Token: 0x060055DA RID: 21978 RVA: 0x001D92B0 File Offset: 0x001D76B0
 public override void SetNeckToEyeOffset(Vector3 avatarEyeToNeckVector)
 {
     this.neckToEyeOffset = avatarEyeToNeckVector / VRCTrackingManager.GetTrackingScale();
     this.CameraStereo.transform.localPosition = this.neckToEyeOffset;
     this.CameraLeft.transform.localPosition   = this.neckToEyeOffset;
     this.CameraRight.transform.localPosition  = this.neckToEyeOffset;
 }
Example #10
0
    // Token: 0x060055CF RID: 21967 RVA: 0x001D8F9C File Offset: 0x001D739C
    public override bool SetSitMode(bool sit, bool calibrate = false)
    {
        if (this._seatedSpace)
        {
            this.cameraLiftTransform.localPosition = new Vector3(0f, VRCTrackingManager.GetPlayerSeatedSpaceAdjustment(), 0f);
            return(true);
        }
        bool flag = sit != this._seatedPlay;

        this._seatedPlay = sit;
        float y;

        if (this._seatedPlay)
        {
            bool recalibrate = calibrate;
            if (!this._seatedPlayCalibrated)
            {
                recalibrate = true;
                this._seatedPlayCalibrated = true;
            }
            y = VRCTrackingManager.GetPlayerSeatedPlayAdjustment(recalibrate);
        }
        else
        {
            y = VRCTrackingManager.GetPlayerHeightAdjustment();
        }
        this.cameraLiftTransform.localPosition = new Vector3(0f, y, 0f);
        if (flag)
        {
            InputTracking.Recenter();
        }
        return(sit);
    }
Example #11
0
    // Token: 0x060056EB RID: 22251 RVA: 0x001DEA2C File Offset: 0x001DCE2C
    private void Update()
    {
        if (!this.IsInVRMode())
        {
            Time.fixedDeltaTime = Time.timeScale * VRCApplication.OriginalFixedDelta;
        }
        bool flag = VRCInputManager.LastInputMethod == VRCInputManager.InputMethod.Vive || VRCInputManager.LastInputMethod == VRCInputManager.InputMethod.Oculus;

        if (flag)
        {
            this._areControllersAsleep = false;
            this._usingHandControllers = true;
        }
        else if (!this._areControllersAsleep)
        {
            if (this._usingHandControllers)
            {
                this._usingHandControllers        = false;
                this._controllerSleepTimeoutStart = Time.unscaledTime;
            }
            if (Time.unscaledTime - this._controllerSleepTimeoutStart > 1f)
            {
                this._areControllersAsleep = true;
                VRCTrackingManager.OnHandControllerAsleep();
            }
        }
    }
Example #12
0
        void OnApplicationFocus(bool hasFocus)
        {
            if (!(bool)VRCFPSManager.Config.LowFPSUnfocused)
            {
                return;
            }
            if (VRCTrackingManager.IsInVRMode())
            {
                return;
            }

            if (hasFocus)
            {
                if ((bool)VRCFPSManager.Config.UnlimitedFPS)
                {
                    Application.targetFrameRate = 0;
                }
                else
                {
                    Application.targetFrameRate = VRCFPSManager.OriginalFrameRate;
                }
            }
            else
            {
                Application.targetFrameRate = 5;
            }
        }
Example #13
0
    // Token: 0x06006251 RID: 25169 RVA: 0x0022F0A8 File Offset: 0x0022D4A8
    private void Update()
    {
        float num = VRCTrackingManager.GetTrackingScale();

        if (num <= 0f)
        {
            num = 1f;
        }
        if (!Mathf.Approximately(this.lastParticleScale, num))
        {
            for (int i = 0; i < this.particles.Length; i++)
            {
                float startSizeMultiplier = num * this.baseSizes[i];
                // HMM.
                this.particles[i].startSize = startSizeMultiplier;
                //this.particles[i].main.startSizeMultiplier = startSizeMultiplier;
            }
        }
        this.lastParticleScale = num;
        if (this.AnimateUV)
        {
            this.lineRenderer.material.SetTextureOffset("_MainTex", new Vector2(Time.time * this.UVTime + this.initialBeamOffset, 0f));
        }
        if (!this.isArc)
        {
            this.Raycast(num);
        }
    }
Example #14
0
    // Token: 0x06006261 RID: 25185 RVA: 0x002315F8 File Offset: 0x0022F9F8
    public override void UpdateCursor(VRCUiCursor.CursorRaycast target, bool useForUi = true)
    {
        if (!this.initialized)
        {
            this.Initialize();
        }
        Transform trackedTransform = VRCTrackingManager.GetTrackedTransform(this.pointerTracking);

        if (trackedTransform != null)
        {
            base.transform.position = trackedTransform.position;
            base.transform.rotation = trackedTransform.rotation;
        }
        if (this.navigationCursor)
        {
            LocomotionInputController.navigationCursorPosition = this.beam.Arccast(1f);
        }
        else
        {
            Transform trackedTransform2 = VRCTrackingManager.GetTrackedTransform(this.touchTracking);
            if (trackedTransform2 != null)
            {
                float trackingScale = VRCTrackingManager.GetTrackingScale();
                target.touch = new BoundingSphere(trackedTransform2.transform.position, trackingScale * this.GetTouchRadius());
                this.over    = base.CheckCursorTouch(target);
            }
            if (this.over.Length == 0)
            {
                target.ray = new Ray(base.transform.position, base.transform.forward);
                this.over  = base.CastCursorRay(target);
            }
            base.SetTargetInfo(target, useForUi);
            this.over = target.over;
        }
    }
    // Token: 0x060051BA RID: 20922 RVA: 0x001BF4D0 File Offset: 0x001BD8D0
    public virtual Vector3 CalculateMoveVelocity(bool obeyHeadlookSetting = true)
    {
        Vector2 zero = Vector2.zero;
        float   axis = this.inAxisHorizontal.axis;
        float   y    = this.inAxisVertical.axis;

        if (VRCInputManager.comfortTurning && this.inComfortLeft.button && this.inComfortRight.button)
        {
            y = 1f;
        }
        zero = new Vector2(axis, y);
        float d      = this.runSpeed;
        bool  button = this.inRun.button;

        d = ((!this.walkByDefault) ? ((!button) ? this.runSpeed : this.walkSpeed) : ((!button) ? this.walkSpeed : this.runSpeed));
        //d *= 10.0f;
        if (zero.sqrMagnitude > 1f)
        {
            zero.Normalize();
        }
        Quaternion rotation = VRCTrackingManager.GetMotionOrientation();

        if (!obeyHeadlookSetting)
        {
            rotation = base.transform.rotation;
        }
        Vector3 a  = rotation * Vector3.forward;
        Vector3 a2 = rotation * Vector3.right;

        return(a * zero.y * d + a2 * zero.x * this.strafeSpeed);
    }
Example #16
0
 // Token: 0x060056B9 RID: 22201 RVA: 0x001DD45B File Offset: 0x001DB85B
 public static float GetAvatarEyeHeight()
 {
     if (VRCTrackingManager.instance.cameraMount == null)
     {
         return(VRCTrackingManager.GetPlayerEyeHeight());
     }
     return(VRCTrackingManager._avatarViewPoint.y);
 }
Example #17
0
 // Token: 0x060056B6 RID: 22198 RVA: 0x001DD3D4 File Offset: 0x001DB7D4
 public static void UseAvatarStationViewPoint(bool isInStation)
 {
     if (VRCTrackingManager.instance.ik != null && VRCTrackingManager.instance.ik.currentIk == IkController.IkType.SixPoint && VRCTrackingManager.instance.ik.HasLowerBodyTracking)
     {
         return;
     }
     VRCTrackingManager.instance.StartCoroutine(VRCTrackingManager.UseAvatarStationViewPointCoroutine(isInStation));
 }
Example #18
0
    private void InternalExitStation(VRC.Player player)
    {
        if (this.Occupant == null || player == null || player != this._occupant)
        {
            return;
        }
        VRC_StationInternal.FlagDiscontinuity(player);
        StationUseExit component = base.GetComponent <StationUseExit>();

        if (component != null)
        {
            UnityEngine.Object.Destroy(component);
        }
        this.Occupant = null;
        if (this.animatorController != null || this.isSeated)
        {
            this.DetachAnimatorControllerFrom(player);
            if (player.isLocal)
            {
                VRCTrackingManager.UseAvatarStationViewPoint(false);
                LocomotionInputController component2 = player.GetComponent <LocomotionInputController>();
                if (component2 != null)
                {
                    component2.immobilize = false;
                }
                VRCMotionState component3 = player.GetComponent <VRCMotionState>();
                if (component3 != null)
                {
                    component3.IsSeated  = false;
                    component3.InVehicle = false;
                }
            }
        }
        if (this.stationControls != null)
        {
            this.stationControls.controllingPlayer = null;
        }
        Collider component4 = player.GetComponent <Collider>();

        if (component4 != null)
        {
            component4.enabled = true;
        }
        this.DetachInputControllerFrom(player.gameObject);
        this.ReleasePlayerTransform(player.gameObject);
        player.currentStation = null;
        if (TutorialManager.Instance != null && player.isLocal && this.isImmobilized)
        {
            TutorialManager.Instance.DeactivateObjectLabel(null);
            TutorialManager.Instance.DeactivateControllerLabel(ControllerHand.Left, ControllerInputUI.TrackpadTop);
        }
        if (player.isLocal)
        {
            VRCTrackingManager.RestoreLevel();
        }
        VRC_StationInternal.RemoveActiveStation(this);
        base.SendMessage("OnStationExited", SendMessageOptions.DontRequireReceiver);
    }
Example #19
0
 // Token: 0x060056D2 RID: 22226 RVA: 0x001DDD86 File Offset: 0x001DC186
 public static void SetTrackingForCalibration()
 {
     VRCTrackingManager.SetControllerVisibility(true);
     if (VRCVrCamera.GetInstance().GetSitMode())
     {
         Debug.LogError("ERROR: You are trying to calibrate in seated play mode!");
     }
     VRCVrCamera.GetInstance().SetSitMode(false, false);
 }
Example #20
0
    // Token: 0x06005569 RID: 21865 RVA: 0x001D7898 File Offset: 0x001D5C98
    private void EnableControllerVisibility(ControllerHand hand, bool enable)
    {
        ControllerUI controllerUI = VRCTrackingManager.GetControllerUI(hand);

        if (controllerUI != null)
        {
            controllerUI.EnableVisibility(enable);
        }
    }
Example #21
0
 // Token: 0x06004E96 RID: 20118 RVA: 0x001A5A78 File Offset: 0x001A3E78
 private void Update()
 {
     if (this._playing)
     {
         this._elapsed  += Time.deltaTime;
         this._transInfo = this._avatarAnim.GetAnimatorTransitionInfo(0);
         if (this._baseLayer >= 0)
         {
             this._baseWt = Mathf.MoveTowards(this._baseWt, 1f, Time.deltaTime * 4f);
             this._avatarAnim.SetLayerWeight(this._baseLayer, this._baseWt);
         }
         if (this._locoLayer >= 0)
         {
             this._locoWt = Mathf.MoveTowards(this._locoWt, 0f, Time.deltaTime * 4f);
             this._avatarAnim.SetLayerWeight(this._locoLayer, this._locoWt);
         }
         if (this._isLocal && (this._motionState.isLocomoting || (!this._motionState.IsSeated && this._wasSeated)))
         {
             this._cancelled = true;
             VRC.Network.RPC(VRC_EventHandler.VrcTargetType.Others, base.gameObject, "Cancel", new object[0]);
         }
         if (this._elapsed >= this._maxAnimLength || this._transInfo.IsUserName("EmoteExit") || this._cancelled)
         {
             this._playing = false;
             this._outro   = true;
             this._avatarAnim.SetInteger("Emote", 0);
             this._avatarAnim.Update(0f);
             if (this._isLocal)
             {
                 VRCTrackingManager.SetPlayerNearTracking(true);
                 this._inputStateMgr.PopInputController();
             }
             this._ik.HeadControl(true);
             this._gest.GestureEnable(true);
             this._ik.FullIKBlend = 1f;
         }
     }
     if (this._outro)
     {
         if (this._baseLayer >= 0)
         {
             this._baseWt = Mathf.MoveTowards(this._baseWt, this._baseOrigWt, Time.deltaTime * 4f);
             this._avatarAnim.SetLayerWeight(this._baseLayer, this._baseWt);
         }
         if (this._locoLayer >= 0)
         {
             this._locoWt = Mathf.MoveTowards(this._locoWt, this._locoOrigWt, Time.deltaTime * 4f);
             this._avatarAnim.SetLayerWeight(this._locoLayer, this._locoWt);
         }
         if (this._baseLayer < 0 || this._baseWt == this._baseOrigWt)
         {
             this._outro = false;
             this._ik.Reset(true);
         }
     }
 }
Example #22
0
 // Token: 0x060062D2 RID: 25298 RVA: 0x00230B4C File Offset: 0x0022EF4C
 public virtual void HideAll()
 {
     foreach (KeyValuePair <string, VRCUiPage> keyValuePair in this.ActiveScreens)
     {
         keyValuePair.Value.SetShown(false);
     }
     this.ActiveScreens.Clear();
     this.CheckUiActive();
     VRCTrackingManager.SetControllerVisibility(false);
 }
Example #23
0
    // Token: 0x0600553D RID: 21821 RVA: 0x001D63DC File Offset: 0x001D47DC
    private void UpdateScale()
    {
        Transform trackedTransform = VRCTrackingManager.GetTrackedTransform(VRCTracking.ID.Hmd);
        float     magnitude        = (base.transform.position - trackedTransform.position).magnitude;
        float     num = Mathf.Lerp(TutorialLabel.MinScale, TutorialLabel.MaxScale, (magnitude - TutorialLabel.NearViewDistance) / (TutorialLabel.FarViewDistance - TutorialLabel.NearViewDistance));

        this.Tether.transform.localScale   = new Vector3(this._tetherLength * num, 1f, 1f);
        this.Label.transform.localPosition = new Vector3(0f, 0f, (this._tetherLength + 0.01f) * num);
        this.Label.transform.localScale    = new Vector3(num * this._textScaleOverride, num * this._textScaleOverride, num * this._textScaleOverride);
    }
Example #24
0
    // Token: 0x06005540 RID: 21824 RVA: 0x001D6658 File Offset: 0x001D4A58
    public static Vector3 CalculateFloatingLabelPosition()
    {
        Transform trackedTransform = VRCTrackingManager.GetTrackedTransform(VRCTracking.ID.Hmd);
        Vector3   vector           = trackedTransform.forward.GetPlanarDirection() * TutorialLabel.LabelFloatingDistanceZ;

        vector.y = ((!(QuickMenu.Instance != null) || !QuickMenu.Instance.IsActiveOnDesktop()) ? TutorialLabel.LabelFloatingDistanceY : TutorialLabel.LabelFloatingDistanceY_DesktopQuickMenu);
        vector  += trackedTransform.position;
        vector.y = Mathf.Max(vector.y, VRCTrackingManager.GetTrackingWorldOrigin().y + 0.25f);
        return(vector);
    }
Example #25
0
    // Token: 0x060056DD RID: 22237 RVA: 0x001DE0EC File Offset: 0x001DC4EC
    public static void DecreasePlayerHeight()
    {
        float num = VRCTrackingManager.GetPlayerHeight();

        num -= 0.0254f;
        if (num >= 0.9144f)
        {
            VRCTrackingManager.SetPlayerHeight(num);
        }
    }
Example #26
0
    // Token: 0x060056DC RID: 22236 RVA: 0x001DE0C0 File Offset: 0x001DC4C0
    public static void IncreasePlayerHeight()
    {
        float num = VRCTrackingManager.GetPlayerHeight();

        num += 0.0254f;
        if (num <= 2.4384f)
        {
            VRCTrackingManager.SetPlayerHeight(num);
        }
    }
Example #27
0
    // Token: 0x060056B4 RID: 22196 RVA: 0x001DD388 File Offset: 0x001DB788
    public static void OffsetCameraForHeight(float scale, float eyeHeight, bool adjustHeight = true)
    {
        if (adjustHeight)
        {
            VRCTrackingManager.playerHeightAdjust = VRCTrackingManager.GetAvatarViewPoint().y / scale - eyeHeight;
        }
        bool sitMode = VRCVrCamera.GetInstance().GetSitMode();

        VRCVrCamera.GetInstance().SetSitMode(sitMode, false);
    }
Example #28
0
 // Token: 0x060062D5 RID: 25301 RVA: 0x00230CE4 File Offset: 0x0022F0E4
 public void PlaceUi()
 {
     if (VRCTrackingManager.IsInitialized())
     {
         VRCPlayer vrcplayer = (!APIUser.IsLoggedIn) ? null : VRCPlayer.Instance;
         float     num       = VRCTrackingManager.GetTrackingScale();
         if (num <= 0f)
         {
             num = 1f;
         }
         Vector3 position = VRCVrCamera.GetInstance().GetWorldCameraPos();
         if (vrcplayer != null)
         {
             Vector3 position2 = vrcplayer.transform.InverseTransformPoint(position);
             if (position2.y < 0.8f * num)
             {
                 position2.y = 0.8f * num;
             }
             position = vrcplayer.transform.TransformPoint(position2);
         }
         this.playerTrackingDisplay.position = position;
         Vector3 euler = Vector3.zero;
         if (VRCTrackingManager.IsInVRMode())
         {
             euler = VRCTrackingManager.GetWorldTrackingOrientation().eulerAngles;
         }
         else if (vrcplayer != null)
         {
             euler = vrcplayer.transform.rotation.eulerAngles;
         }
         else
         {
             euler = VRCVrCamera.GetInstance().GetWorldCameraRot().eulerAngles;
         }
         euler.x = (euler.z = 0f);
         this.playerTrackingDisplay.rotation = Quaternion.Euler(euler);
         if (num >= 0f)
         {
             this.playerTrackingDisplay.localScale = num * Vector3.one;
         }
         else
         {
             this.playerTrackingDisplay.localScale = Vector3.one;
         }
         if (num > 1.401298E-45f)
         {
             this.unscaledUIRoot.localScale = 1f / num * Vector3.one;
         }
         else
         {
             this.unscaledUIRoot.localScale = Vector3.one;
         }
     }
 }
Example #29
0
    // Token: 0x06005579 RID: 21881 RVA: 0x001D7F30 File Offset: 0x001D6330
    private void DeactivateLabel(TutorialManager.ActiveLabel label)
    {
        label.TimeToLive = -1f;
        label.Label.Deactivate();
        ControllerUI controllerUI = VRCTrackingManager.GetControllerUI(label.Hand);

        if (controllerUI != null)
        {
            controllerUI.EnableHighlight(label.ControllerPart, false);
        }
        this.RefreshControllerUiVisibility(label.Hand);
    }
Example #30
0
    // Token: 0x060056CF RID: 22223 RVA: 0x001DDD00 File Offset: 0x001DC100
    public static bool IsPointWithinHMDView(Vector3 pt)
    {
        Transform trackedTransform = VRCTrackingManager.GetTrackedTransform(VRCTracking.ID.Hmd);

        if (trackedTransform == null)
        {
            return(false);
        }
        Vector3 vector = pt - trackedTransform.position;

        return(vector.magnitude >= 0.1f && Vector3.Dot(trackedTransform.forward, vector.normalized) > Mathf.Cos(0.9599311f));
    }