This commit is contained in:
NotAKidoS 2023-05-09 03:46:58 -05:00
parent 26441f8b1e
commit c7b16abd4f
27 changed files with 591 additions and 91 deletions

View file

@ -77,9 +77,17 @@ internal static class CameraLogic
// Copy basic settings
ourCamComponent.farClipPlane = playerCamComponent.farClipPlane;
ourCamComponent.nearClipPlane = playerCamComponent.nearClipPlane;
ourCamComponent.cullingMask = playerCamComponent.cullingMask;
ourCamComponent.depthTextureMode = playerCamComponent.depthTextureMode;
// We cant copy this because we set it to 0
ourCamComponent.cullingMask &= -32769;
ourCamComponent.cullingMask |= 256;
ourCamComponent.cullingMask |= 512;
ourCamComponent.cullingMask |= 32;
ourCamComponent.cullingMask &= -4097;
ourCamComponent.cullingMask |= 1024;
ourCamComponent.cullingMask |= 8192;
// Copy post processing if added
PostProcessLayer ppLayerPlayerCam = playerCamComponent.GetComponent<PostProcessLayer>();
PostProcessLayer ppLayerThirdPerson = ourCamComponent.AddComponentIfMissing<PostProcessLayer>();