Ejemplo n.º 1
0
 private void CheckSneakRoomscale()
 {
     if (VHVRConfig.RoomScaleSneakEnabled())
     {
         float height          = Valve.VR.InteractionSystem.Player.instance.eyeHeight;
         float heightThreshold = referencePlayerHeight * VHVRConfig.RoomScaleSneakHeight();
         if (height < heightThreshold)
         {
             _isRoomscaleSneaking = true;
         }
         else if (height > heightThreshold + heightThreshold * 0.05f)
         {
             _isRoomscaleSneaking = false;
         }
     }
     else
     {
         _isRoomscaleSneaking = false;
     }
 }