Example #1
0
    // Token: 0x060056BA RID: 22202 RVA: 0x001DD484 File Offset: 0x001DB884
    public static float GetPlayerUprightAmount()
    {
        VRCPlayer   vrcplayer   = VRCPlayer.Instance;
        VRCVrCamera vrcvrCamera = VRCVrCamera.GetInstance();
        float       value       = 1f;
        float       num         = VRCTrackingManager.playerEyeHeight;

        if (vrcplayer.GetVRMode())
        {
            float num2 = VRCTrackingManager.playerEyeHeight;
            float num3 = VRCTrackingManager.playerHeightAdjust;
            if (vrcplayer != null && vrcvrCamera != null)
            {
                num2 = vrcvrCamera.GetLocalCameraPos().y - num3;
                num  = VRCTrackingManager.playerEyeHeight;
            }
            value = num2 / num;
        }
        return(Mathf.Clamp01(value));
    }