diff --git a/FreeCam/MainClass.cs b/FreeCam/MainClass.cs index dc33922..29b54e6 100644 --- a/FreeCam/MainClass.cs +++ b/FreeCam/MainClass.cs @@ -20,7 +20,8 @@ class MainClass : ModBehaviour private InputMode _storedMode; private int _fov; - private ICommonCameraAPI _commonCameraAPI; + private int _nearClipPlane; + private ICommonCameraAPI _commonCameraAPI; private GameObject _hud; private static MainClass _instance; @@ -62,14 +63,17 @@ void OnDestroy() public override void Configure(IModConfig config) { _fov = config.GetSettingsValue("FOV"); - ShowPrompts = !config.GetSettingsValue("Hide Prompts"); + _nearClipPlane = config.GetSettingsValue("Near Clip Plane Distance"); + ShowPrompts = !config.GetSettingsValue("Hide Prompts"); // If the mod is currently active we can set these immediately if (_camera != null) { _camera.fieldOfView = _fov; _owCamera.fieldOfView = _fov; - } + _camera.nearClipPlane = _nearClipPlane; + _owCamera.nearClipPlane = _nearClipPlane; + } } private void OnSceneLoaded(Scene scene, LoadSceneMode _) diff --git a/FreeCam/default-config.json b/FreeCam/default-config.json index d62c9be..0a3addb 100644 --- a/FreeCam/default-config.json +++ b/FreeCam/default-config.json @@ -1,7 +1,8 @@ { "enabled": true, - "settings": { - "FOV": 90, - "Hide Prompts": false - } + "settings": { + "FOV": 90, + "Near Clip Plane Distance": 1, + "Hide Prompts": false + } } \ No newline at end of file