From 40e8251c0bf310e164b910d9c606a1347f016d37 Mon Sep 17 00:00:00 2001 From: DaXcess Date: Thu, 1 Feb 2024 21:56:16 +0100 Subject: [PATCH] Cool fog bugfix and helmet addition --- CHANGELOG.md | 5 +++++ LCVR/Config.cs | 3 ++- LCVR/EntryPoint.cs | 9 +++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df0a0680..21b4644f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ **Bug fixes:** - Fixed event handler leak in the Keyboard causing the game to hang +- Fixed weird fog rendering issue in the left eye when the radar is active + +**Added configuration:** + +- Added new configuration option `EnableHelmetVisor` (Default: false). When enabled, will show the first person visor model. # 1.1.7 diff --git a/LCVR/Config.cs b/LCVR/Config.cs index 721edf31..08dd1518 100644 --- a/LCVR/Config.cs +++ b/LCVR/Config.cs @@ -10,7 +10,8 @@ public class Config(ConfigFile file) public ConfigEntry DisableVR { get; } = file.Bind("General", "DisableVR", false, "Disables the main functionality of this mod, can be used if you want to play without VR while keeping the mod installed."); public ConfigEntry IntroScreenSeen { get; } = file.Bind("General", "IntroScreenSeen", false, "Whether the VR intro screen has been displayed before. This configuration option should be set automatically."); - + public ConfigEntry EnableHelmetVisor { get; } = file.Bind("General", "EnableHelmetVisor", false, "Enabled the first person helmet visor and helmet. This will restrict your field of view, but looks more immersive."); + // Performance configuration public ConfigEntry EnableDynamicResolution { get; } = file.Bind("Performance", "EnableDynamicResolution", false, "Whether or not dynamic resolution should be enabled. Required for most of these settings to have an effect."); diff --git a/LCVR/EntryPoint.cs b/LCVR/EntryPoint.cs index a2e4eea1..487ee536 100644 --- a/LCVR/EntryPoint.cs +++ b/LCVR/EntryPoint.cs @@ -51,8 +51,13 @@ private static IEnumerator Start() if (input != null) input.enabled = false; - // Disable first person helmet - GameObject.Find("PlayerHUDHelmetModel").SetActive(false); + // Move around the volumetric plane + var helmetContainer = GameObject.Find("Systems/Rendering/PlayerHUDHelmetModel"); + var helmetModel = helmetContainer.Find("ScavengerHelmet"); + helmetModel.transform.Find("Plane").SetParent(helmetContainer.transform); + + // Toggle helmet visor visibility + helmetModel.SetActive(Plugin.Config.EnableHelmetVisor.Value); // Disable ui camera and promote main camera mainCamera.targetTexture = null;