diff --git a/.idea/.idea.BABA_YAGA/.idea/indexLayout.xml b/.idea/.idea.BABA_YAGA/.idea/indexLayout.xml
new file mode 100644
index 00000000..7b08163c
--- /dev/null
+++ b/.idea/.idea.BABA_YAGA/.idea/indexLayout.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.BABA_YAGA/.idea/workspace.xml b/.idea/.idea.BABA_YAGA/.idea/workspace.xml
index 99bf76b8..0ba418f9 100644
--- a/.idea/.idea.BABA_YAGA/.idea/workspace.xml
+++ b/.idea/.idea.BABA_YAGA/.idea/workspace.xml
@@ -6,23 +6,41 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -94,7 +112,7 @@
-
+
@@ -105,6 +123,7 @@
+
@@ -125,6 +144,7 @@
+
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Demo.unity b/Assets/Opsive/UltimateCharacterController/Demo/Demo.unity
index 85830f46..9ab80808 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Demo.unity
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Demo.unity
@@ -119008,13 +119008,13 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_EnemyLayers:
serializedVersion: 2
- m_Bits: 100663296
+ m_Bits: 0
m_InvisibleLayers:
serializedVersion: 2
m_Bits: 1879048198
m_SolidObjectLayers:
serializedVersion: 2
- m_Bits: 2382364675
+ m_Bits: 2281701379
--- !u!114 &1278971606
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -135443,10 +135443,10 @@ TextMesh:
m_GameObject: {fileID: 1485857039}
m_Text: 'The Aim Assist Component can keep
- your crosshairs centered on a
- target
+ your crosshairs centered on a target
- based on an influence factor'
+ based
+ on an influence factor'
m_OffsetZ: 0
m_CharacterSize: 1
m_LineSpacing: 1
@@ -171402,7 +171402,7 @@ MonoBehaviour:
- m_Header: Movement Types
m_Description: 'The character and camera can change the way they interpret input.
-
+
-
Press Escape to switch between the movement types.
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Items/Shooter/AssaultRifle/MuzzleFlash.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Items/Shooter/AssaultRifle/MuzzleFlash.mat
index 7beb8438..9ee57d33 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Items/Shooter/AssaultRifle/MuzzleFlash.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Items/Shooter/AssaultRifle/MuzzleFlash.mat
@@ -81,6 +81,6 @@ Material:
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- - _TintColor: {r: 1, g: 1, b: 1, a: 0}
+ - _TintColor: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
m_AllowLocking: 1
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Black.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Black.mat
index 18742702..089eedc7 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Black.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Black.mat
@@ -119,7 +119,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.11764703, g: 0.11764703, b: 0.11764703, a: 1}
- - _Color: {r: 0.117646985, g: 0.117646985, b: 0.117646985, a: 1}
+ - _Color: {r: 0.11764703, g: 0.11764703, b: 0.11764703, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Blue.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Blue.mat
index 70a55b1f..dfedcdc7 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Blue.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Blue.mat
@@ -120,7 +120,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.18101206, g: 0.61652833, b: 0.7941176, a: 1}
- - _Color: {r: 0.18101203, g: 0.61652833, b: 0.7941176, a: 1}
+ - _Color: {r: 0.18101206, g: 0.61652833, b: 0.7941176, a: 1}
- _EmissionColor: {r: 0.05693069, g: 0.1943069, b: 0.25, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/BlueEmissive.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/BlueEmissive.mat
index 29bf5d3e..2e437c7b 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/BlueEmissive.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/BlueEmissive.mat
@@ -133,7 +133,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 0.26590908, b: 0.5735295, a: 1}
- - _Color: {r: 0, g: 0.26590905, b: 0.5735295, a: 1}
+ - _Color: {r: 0, g: 0.26590908, b: 0.5735295, a: 1}
- _EmissionColor: {r: 0.585611, g: 1.1171656, b: 1.7207954, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Car/SkyCarBodyGrey.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Car/SkyCarBodyGrey.mat
index 0decc984..469bf22c 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Car/SkyCarBodyGrey.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Car/SkyCarBodyGrey.mat
@@ -155,7 +155,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.2641509, g: 0.06105373, b: 0.06105373, a: 1}
- - _Color: {r: 0.26415086, g: 0.0610537, b: 0.0610537, a: 1}
+ - _Color: {r: 0.2641509, g: 0.06105373, b: 0.06105373, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColorWithMapUI: {r: 0, g: 0, b: 0, a: 1}
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Car/SkyCarWheelGrey.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Car/SkyCarWheelGrey.mat
index c55a6550..a2c28a9f 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Car/SkyCarWheelGrey.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Car/SkyCarWheelGrey.mat
@@ -150,7 +150,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.24528295, g: 0.24528295, b: 0.24528295, a: 1}
- - _Color: {r: 0.24528292, g: 0.24528292, b: 0.24528292, a: 1}
+ - _Color: {r: 0.24528295, g: 0.24528295, b: 0.24528295, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColorWithMapUI: {r: 0, g: 0, b: 0, a: 1}
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/DarkBlue.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/DarkBlue.mat
index 1dbd16c7..a108d7fe 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/DarkBlue.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/DarkBlue.mat
@@ -133,7 +133,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.18039212, g: 0.49699998, b: 0.7921569, a: 1}
- - _Color: {r: 0.18039209, g: 0.49699998, b: 0.7921569, a: 1}
+ - _Color: {r: 0.18039212, g: 0.49699998, b: 0.7921569, a: 1}
- _EmissionColor: {r: 0.05693069, g: 0.15717824, b: 0.25, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Exterior/ExteriorDarkGrid.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Exterior/ExteriorDarkGrid.mat
index 42516647..951175dd 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Exterior/ExteriorDarkGrid.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Exterior/ExteriorDarkGrid.mat
@@ -120,7 +120,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.08490568, g: 0.08490568, b: 0.08490568, a: 1}
- - _Color: {r: 0.08490565, g: 0.08490565, b: 0.08490565, a: 1}
+ - _Color: {r: 0.08490568, g: 0.08490568, b: 0.08490568, a: 1}
- _EmissionColor: {r: 0.63061863, g: 0.94044524, b: 1.6181911, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/IndoorSphereEmissive.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/IndoorSphereEmissive.mat
index 6ba45c8b..75f78293 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/IndoorSphereEmissive.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/IndoorSphereEmissive.mat
@@ -133,7 +133,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 0.26590908, b: 0.5735295, a: 1}
- - _Color: {r: 0, g: 0.26590905, b: 0.5735295, a: 1}
+ - _Color: {r: 0, g: 0.26590908, b: 0.5735295, a: 1}
- _EmissionColor: {r: 0, g: 0.45371014, b: 0.69886, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/FastTimeOrbInner.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/FastTimeOrbInner.mat
index c15bddf1..4dacd917 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/FastTimeOrbInner.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/FastTimeOrbInner.mat
@@ -133,7 +133,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 1, b: 0.090196066, a: 0.36078432}
- - _Color: {r: 0, g: 1, b: 0.09019602, a: 0.36078432}
+ - _Color: {r: 0, g: 1, b: 0.090196066, a: 0.36078432}
- _EmissionColor: {r: 0, g: 1, b: 0.09019608, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/FastTimeOrbOuter.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/FastTimeOrbOuter.mat
index 5acbff7b..73963e91 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/FastTimeOrbOuter.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/FastTimeOrbOuter.mat
@@ -125,7 +125,7 @@ Material:
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0, g: 1, b: 0.089654915, a: 0.359}
- - _Color: {r: 0, g: 1, b: 0.089654885, a: 0.359}
+ - _Color: {r: 0, g: 1, b: 0.089654915, a: 0.359}
- _EmissionColor: {r: 0.315, g: 0.315, b: 0.315, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/SlowTimeOrbInner.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/SlowTimeOrbInner.mat
index 4b4c9ee7..74e7357e 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/SlowTimeOrbInner.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/SlowTimeOrbInner.mat
@@ -133,7 +133,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0.17647055, b: 0.17647055, a: 0.36078432}
- - _Color: {r: 1, g: 0.17647052, b: 0.17647052, a: 0.36078432}
+ - _Color: {r: 1, g: 0.17647055, b: 0.17647055, a: 0.36078432}
- _EmissionColor: {r: 1, g: 0.1764706, b: 0.1764706, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/SlowTimeOrbOuter.mat b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/SlowTimeOrbOuter.mat
index 80b3acab..aa94d333 100644
--- a/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/SlowTimeOrbOuter.mat
+++ b/Assets/Opsive/UltimateCharacterController/Demo/Materials/Scene/Props/SlowTimeOrbOuter.mat
@@ -125,7 +125,7 @@ Material:
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 0.17647055, b: 0.17647055, a: 0.359}
- - _Color: {r: 1, g: 0.17647052, b: 0.17647052, a: 0.359}
+ - _Color: {r: 1, g: 0.17647055, b: 0.17647055, a: 0.359}
- _EmissionColor: {r: 0.315, g: 0.315, b: 0.315, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.XML b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.XML
deleted file mode 100644
index 02c3c95e..00000000
--- a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.XML
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
- DOTweenUpgradeManager
-
-
-
-
- This class and its whole library are deleted the first time DOTween's setup is run after an upgrade (or after a new install).
- NOTE: DidReloadScripts doesn't work on first install so it's useless, InitializeOnLoad is the only way
-
-
-
-
diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.XML.meta b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.XML.meta
deleted file mode 100644
index f37f6be0..00000000
--- a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.XML.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 3df9fdaadcb4c394e826a4d8d20bb952
-TextScriptImporter:
- userData:
-AssetOrigin:
- serializedVersion: 1
- productId: 27676
- packageName: DOTween (HOTween v2)
- packageVersion: 1.2.825
- assetPath: Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.XML
- uploadId: 862444
diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll
deleted file mode 100644
index d8c36d80..00000000
Binary files a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll and /dev/null differ
diff --git a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.meta b/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.meta
deleted file mode 100644
index 7b3b0634..00000000
--- a/Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll.meta
+++ /dev/null
@@ -1,29 +0,0 @@
-fileFormatVersion: 2
-guid: 2bf936a5d80799e4e88ec9270fea75a4
-PluginImporter:
- serializedVersion: 1
- iconMap: {}
- executionOrder: {}
- isPreloaded: 0
- platformData:
- Any:
- enabled: 0
- settings: {}
- Editor:
- enabled: 1
- settings:
- DefaultValueInitialized: true
- WindowsStoreApps:
- enabled: 0
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
-AssetOrigin:
- serializedVersion: 1
- productId: 27676
- packageName: DOTween (HOTween v2)
- packageVersion: 1.2.825
- assetPath: Assets/Plugins/Demigiant/DOTween/Editor/DOTweenUpgradeManager.dll
- uploadId: 862444
diff --git a/Assets/Scripts/Camera/Prototype/CameraController.cs b/Assets/Scripts/Camera/Prototype/CameraController.cs
index dc95c9a1..65c0ed40 100644
--- a/Assets/Scripts/Camera/Prototype/CameraController.cs
+++ b/Assets/Scripts/Camera/Prototype/CameraController.cs
@@ -135,6 +135,9 @@ namespace OnlyScove.Scripts
if (followTarget == null) return;
HandleViewTransition();
+ // If we are in transition, HandleViewTransition takes full control of the camera transform
+ if (_inTransition) return;
+
if (inputReader != null)
{
// Input-related updates are handled differently based on view mode
@@ -165,28 +168,28 @@ namespace OnlyScove.Scripts
targetDistance = collisionHandler.CheckCollision(focusPosition, rotationHandler.CurrentRotation, zoomHandler.CurrentDistance, zoomHandler.MinDistance);
characterFading.HandleCharacterFading(targetDistance);
occlusionTransparency.HandleTransparency(transform, focusPosition);
+
+ // Reset near clip plane for TPV if needed
+ if (_cam.nearClipPlane < 0.1f) _cam.nearClipPlane = 0.3f;
}
else // FirstPerson
{
// FPV specific calculations
- // Player's horizontal rotation (body) follows mouse YAW
- if (followTarget != null)
- {
- followTarget.rotation = rotationHandler.PlanarRotation; // Sync body to camera yaw
- }
+ if (followTarget != null) followTarget.rotation = rotationHandler.PlanarRotation;
+ if (fpvTarget != null) fpvTarget.rotation = rotationHandler.CurrentRotation;
- if (fpvTarget != null)
- {
- fpvTarget.rotation = rotationHandler.CurrentRotation; // Sync head/eyes to full camera rotation
- }
-
- transform.rotation = rotationHandler.CurrentRotation; // Set camera rotation from handler (which includes vertical)
+ transform.rotation = rotationHandler.CurrentRotation;
focusPosition = fpvTarget.position;
- targetDistance = 0; // FPV has no distance to player
+ targetDistance = 0;
- // Disable TPV-specific effects
- characterFading.HandleCharacterFading(0); // Fully opaque character in FPV
- occlusionTransparency.HandleTransparency(transform, fpvTarget.position); // Can still have occlusion transparency for environment in FPV
+ // AGGRESSIVE DEBUG FIX:
+ _cam.nearClipPlane = 0.01f;
+ _cam.farClipPlane = 2000f; // Ensure world isn't being cut off
+ _cam.cullingMask = -1; // Force camera to see EVERY LAYER
+
+ // Disable these temporarily to see if they are the cause
+ // characterFading.HandleCharacterFading(0.01f);
+ occlusionTransparency.ResetLastRenderer();
}
// Calculate target position using the currently set transform.rotation
@@ -203,6 +206,23 @@ namespace OnlyScove.Scripts
if (_inTransition) return; // Prevent multiple toggles during transition
_targetViewMode = (_currentViewMode == CameraViewMode.ThirdPerson) ? CameraViewMode.FirstPerson : CameraViewMode.ThirdPerson;
+
+ if (_targetViewMode == CameraViewMode.FirstPerson && fpvTarget == null)
+ {
+ Debug.LogWarning("[CameraController] Cannot switch to FPV: fpvTarget is not assigned!");
+ return;
+ }
+
+ // Initialize rotation handler immediately so PlanarRotation is correct during transition
+ if (_targetViewMode == CameraViewMode.FirstPerson)
+ {
+ rotationHandler.InitializeFPV(fpvTarget);
+ }
+ else
+ {
+ rotationHandler.Initialize(transform);
+ }
+
Debug.Log($"[CameraController] Toggling view from {_currentViewMode} to {_targetViewMode}");
_inTransition = true;
_transitionTimer = 0f;
@@ -217,11 +237,14 @@ namespace OnlyScove.Scripts
t = Mathf.Clamp01(t); // Clamp t between 0 and 1
// Smoothly interpolate parameters during transition
- if (_currentViewMode == CameraViewMode.ThirdPerson && _targetViewMode == CameraViewMode.FirstPerson)
+ if (_targetViewMode == CameraViewMode.FirstPerson)
{
// TPV -> FPV transition
// Interpolate FOV
_cam.fieldOfView = Mathf.Lerp(dynamicFOV.CurrentTpvBaseFOV, fpvFOV, t);
+
+ // Adjust Near Clip Plane during transition to prevent blue screen (clipping)
+ _cam.nearClipPlane = Mathf.Lerp(0.3f, 0.01f, t);
// Rotate player body to match camera's intended horizontal look direction
if (followTarget != null)
@@ -230,14 +253,18 @@ namespace OnlyScove.Scripts
}
// Interpolate position and rotation
- transform.position = Vector3.Lerp(transform.position, fpvTarget.position, t);
- transform.rotation = Quaternion.Slerp(transform.rotation, fpvTarget.rotation, t);
+ if (fpvTarget != null)
+ {
+ transform.position = Vector3.Lerp(transform.position, fpvTarget.position, t);
+ transform.rotation = Quaternion.Slerp(transform.rotation, fpvTarget.rotation, t);
+ }
}
- else if (_currentViewMode == CameraViewMode.FirstPerson && _targetViewMode == CameraViewMode.ThirdPerson)
+ else
{
// FPV -> TPV transition
// Interpolate FOV
_cam.fieldOfView = Mathf.Lerp(fpvFOV, dynamicFOV.CurrentTpvBaseFOV, t);
+ _cam.nearClipPlane = Mathf.Lerp(0.01f, 0.3f, t);
}
if (t >= 1f)
@@ -245,19 +272,10 @@ namespace OnlyScove.Scripts
_currentViewMode = _targetViewMode;
Debug.Log($"[CameraController] View transition complete. Current mode: {_currentViewMode}");
_inTransition = false;
-
- // Initialize rotation handler based on new view mode
- if (_currentViewMode == CameraViewMode.FirstPerson && fpvTarget != null)
- {
- rotationHandler.InitializeFPV(fpvTarget); // Initialize FPV rotation handler
- }
- else
- {
- rotationHandler.Initialize(transform); // Initialize TPV rotation handler
- }
- // Ensure FOV is set correctly at the end of transition
+ // Ensure final values are set correctly
_cam.fieldOfView = (_currentViewMode == CameraViewMode.FirstPerson) ? fpvFOV : dynamicFOV.CurrentTpvBaseFOV;
+ _cam.nearClipPlane = (_currentViewMode == CameraViewMode.FirstPerson) ? 0.01f : 0.3f;
}
}
diff --git a/Assets/Scripts/Camera/Prototype/CameraOcclusionTransparency.cs b/Assets/Scripts/Camera/Prototype/CameraOcclusionTransparency.cs
index c13e4e7d..0481af65 100644
--- a/Assets/Scripts/Camera/Prototype/CameraOcclusionTransparency.cs
+++ b/Assets/Scripts/Camera/Prototype/CameraOcclusionTransparency.cs
@@ -23,6 +23,14 @@ namespace OnlyScove.Scripts
Vector3 direction = focusPosition - cameraTransform.position;
float distanceToPlayer = direction.magnitude;
+
+ // Prevent raycasting if we are too close (common in FPV)
+ if (distanceToPlayer < 0.1f)
+ {
+ ResetLastRenderer();
+ return;
+ }
+
RaycastHit hit;
if (Physics.Raycast(cameraTransform.position, direction.normalized, out hit, distanceToPlayer, transparencyLayers))
@@ -46,7 +54,7 @@ namespace OnlyScove.Scripts
}
}
- private void ResetLastRenderer()
+ public void ResetLastRenderer()
{
if (_lastFadedRenderer != null)
{
diff --git a/Assets/Scripts/Camera/Prototype/CameraRotationHandler.cs b/Assets/Scripts/Camera/Prototype/CameraRotationHandler.cs
index a4670f0c..b5a71c37 100644
--- a/Assets/Scripts/Camera/Prototype/CameraRotationHandler.cs
+++ b/Assets/Scripts/Camera/Prototype/CameraRotationHandler.cs
@@ -36,8 +36,14 @@ namespace OnlyScove.Scripts
// New method to initialize rotation specifically for FPV
public void InitializeFPV(Transform fpvTargetTransform)
{
- _rotationX = fpvTargetTransform.localEulerAngles.x; // Use local rotation for vertical angle in FPV
- _rotationY = fpvTargetTransform.eulerAngles.y; // Use world rotation for horizontal angle
+ Vector3 eulers = fpvTargetTransform.eulerAngles;
+
+ // Normalize angles to -180 to 180 range for clamping
+ _rotationX = eulers.x;
+ if (_rotationX > 180) _rotationX -= 360;
+
+ _rotationY = eulers.y;
+
_lastInputTime = Time.time;
CurrentRotation = fpvTargetTransform.rotation; // Camera starts matching fpvTarget rotation
}
diff --git a/Assets/Scripts/UI/BaseUIController.cs b/Assets/Scripts/UI/BaseUIController.cs
index 3d838dfc..d8d293e4 100644
--- a/Assets/Scripts/UI/BaseUIController.cs
+++ b/Assets/Scripts/UI/BaseUIController.cs
@@ -3,6 +3,8 @@ using UnityEngine.UIElements;
using PrimeTween;
using System.Threading.Tasks;
using DG.Tweening;
+using Tween = PrimeTween.Tween;
+using Ease = PrimeTween.Ease;
namespace Hallucinate.UI
{
diff --git a/Assets/Scripts/UI/HUDController.cs b/Assets/Scripts/UI/HUDController.cs
index 3596736e..c16ddfa3 100644
--- a/Assets/Scripts/UI/HUDController.cs
+++ b/Assets/Scripts/UI/HUDController.cs
@@ -3,6 +3,8 @@ using UnityEngine.UIElements;
using PrimeTween;
using System.Threading.Tasks;
using DG.Tweening;
+using Tween = PrimeTween.Tween;
+using Ease = PrimeTween.Ease;
namespace Hallucinate.UI
{
diff --git a/Assets/Scripts/UI/LoginController.cs b/Assets/Scripts/UI/LoginController.cs
index a9bc6189..898e66a2 100644
--- a/Assets/Scripts/UI/LoginController.cs
+++ b/Assets/Scripts/UI/LoginController.cs
@@ -3,6 +3,8 @@ using UnityEngine.UIElements;
using PrimeTween;
using System.Threading.Tasks;
using DG.Tweening;
+using Tween = PrimeTween.Tween;
+using Ease = PrimeTween.Ease;
namespace Hallucinate.UI
{
diff --git a/Assets/Scripts/UI/MainMenuController.cs b/Assets/Scripts/UI/MainMenuController.cs
index 44fd96af..d4d3e60b 100644
--- a/Assets/Scripts/UI/MainMenuController.cs
+++ b/Assets/Scripts/UI/MainMenuController.cs
@@ -3,6 +3,8 @@ using UnityEngine.UIElements;
using PrimeTween;
using System.Threading.Tasks;
using DG.Tweening;
+using Tween = PrimeTween.Tween;
+using Ease = PrimeTween.Ease;
namespace Hallucinate.UI
{
diff --git a/Assets/Scripts/UI/SettingsController.cs b/Assets/Scripts/UI/SettingsController.cs
index 80b021b0..68a15a8c 100644
--- a/Assets/Scripts/UI/SettingsController.cs
+++ b/Assets/Scripts/UI/SettingsController.cs
@@ -10,6 +10,8 @@ using DG.Tweening;
using OnlyScove.Scripts;
using Hallucinate.Audio;
using PrimeTween;
+using Tween = PrimeTween.Tween;
+using Ease = PrimeTween.Ease;
namespace Hallucinate.UI
{
diff --git a/Assets/Scripts/UI/UIManager.cs b/Assets/Scripts/UI/UIManager.cs
index a40deb46..20e92199 100644
--- a/Assets/Scripts/UI/UIManager.cs
+++ b/Assets/Scripts/UI/UIManager.cs
@@ -5,6 +5,8 @@ using DG.Tweening;
using UnityEngine;
using UnityEngine.UIElements;
using PrimeTween;
+using Tween = PrimeTween.Tween;
+using Ease = PrimeTween.Ease;
using OnlyScove.Scripts;
#if UNITY_EDITOR
using UnityEditor;
diff --git a/Assets/TEST CUA TUAN/Free Wood Door Pack/Materials/Door_1_Materials/Door_1_Black.mat b/Assets/TEST CUA TUAN/Free Wood Door Pack/Materials/Door_1_Materials/Door_1_Black.mat
index 0e375da2..ed859cf3 100644
--- a/Assets/TEST CUA TUAN/Free Wood Door Pack/Materials/Door_1_Materials/Door_1_Black.mat
+++ b/Assets/TEST CUA TUAN/Free Wood Door Pack/Materials/Door_1_Materials/Door_1_Black.mat
@@ -123,7 +123,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.051470563, g: 0.051470563, b: 0.051470563, a: 1}
- - _Color: {r: 0.051470548, g: 0.051470548, b: 0.051470548, a: 1}
+ - _Color: {r: 0.051470563, g: 0.051470563, b: 0.051470563, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Assets/TEST CUA TUAN/Free Wood Door Pack/Materials/Door_Knob_Material/Copper.mat b/Assets/TEST CUA TUAN/Free Wood Door Pack/Materials/Door_Knob_Material/Copper.mat
index ba3af7a3..6dbf9920 100644
--- a/Assets/TEST CUA TUAN/Free Wood Door Pack/Materials/Door_Knob_Material/Copper.mat
+++ b/Assets/TEST CUA TUAN/Free Wood Door Pack/Materials/Door_Knob_Material/Copper.mat
@@ -122,7 +122,7 @@ Material:
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.75, g: 0.6228195, b: 0.5404411, a: 1}
- - _Color: {r: 0.75, g: 0.6228195, b: 0.54044104, a: 1}
+ - _Color: {r: 0.75, g: 0.6228195, b: 0.5404411, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
diff --git a/Packages/manifest.json b/Packages/manifest.json
index d49bdcd0..4fe483e3 100644
--- a/Packages/manifest.json
+++ b/Packages/manifest.json
@@ -22,6 +22,7 @@
"com.unity.ugui": "2.0.0",
"com.unity.visualeffectgraph": "17.3.0",
"com.unity.visualscripting": "1.9.9",
+ "com.wooshii.foldericons": "https://github.com/WooshiiDev/Unity-Folder-Icons.git",
"com.unity.modules.accessibility": "1.0.0",
"com.unity.modules.adaptiveperformance": "1.0.0",
"com.unity.modules.ai": "1.0.0",
diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json
index d3f4a492..5014c955 100644
--- a/Packages/packages-lock.json
+++ b/Packages/packages-lock.json
@@ -273,6 +273,13 @@
},
"url": "https://packages.unity.com"
},
+ "com.wooshii.foldericons": {
+ "version": "https://github.com/WooshiiDev/Unity-Folder-Icons.git",
+ "depth": 0,
+ "source": "git",
+ "dependencies": {},
+ "hash": "201a18f355d3e9bc49b337e7c93423743ab42b2f"
+ },
"com.unity.modules.accessibility": {
"version": "1.0.0",
"depth": 0,
diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset
index 7171be53..bd9e707e 100644
--- a/ProjectSettings/ProjectSettings.asset
+++ b/ProjectSettings/ProjectSettings.asset
@@ -294,7 +294,196 @@ PlayerSettings:
AndroidReportGooglePlayAppDependencies: 1
androidSymbolsSizeThreshold: 800
m_BuildTargetIcons: []
- m_BuildTargetPlatformIcons: []
+ m_BuildTargetPlatformIcons:
+ - m_BuildTarget: iPhone
+ m_Icons:
+ - m_Textures: []
+ m_Width: 180
+ m_Height: 180
+ m_Kind: 0
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 120
+ m_Height: 120
+ m_Kind: 0
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 167
+ m_Height: 167
+ m_Kind: 0
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 152
+ m_Height: 152
+ m_Kind: 0
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 76
+ m_Height: 76
+ m_Kind: 0
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 120
+ m_Height: 120
+ m_Kind: 3
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 80
+ m_Height: 80
+ m_Kind: 3
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 80
+ m_Height: 80
+ m_Kind: 3
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 40
+ m_Height: 40
+ m_Kind: 3
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 87
+ m_Height: 87
+ m_Kind: 1
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 58
+ m_Height: 58
+ m_Kind: 1
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 29
+ m_Height: 29
+ m_Kind: 1
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 58
+ m_Height: 58
+ m_Kind: 1
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 29
+ m_Height: 29
+ m_Kind: 1
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 60
+ m_Height: 60
+ m_Kind: 2
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 40
+ m_Height: 40
+ m_Kind: 2
+ m_SubKind: iPhone
+ - m_Textures: []
+ m_Width: 40
+ m_Height: 40
+ m_Kind: 2
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 20
+ m_Height: 20
+ m_Kind: 2
+ m_SubKind: iPad
+ - m_Textures: []
+ m_Width: 1024
+ m_Height: 1024
+ m_Kind: 4
+ m_SubKind: App Store
+ - m_BuildTarget: Android
+ m_Icons:
+ - m_Textures: []
+ m_Width: 432
+ m_Height: 432
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 324
+ m_Height: 324
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 216
+ m_Height: 216
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 162
+ m_Height: 162
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 108
+ m_Height: 108
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 81
+ m_Height: 81
+ m_Kind: 2
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 192
+ m_Height: 192
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 144
+ m_Height: 144
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 96
+ m_Height: 96
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 72
+ m_Height: 72
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 48
+ m_Height: 48
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 36
+ m_Height: 36
+ m_Kind: 1
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 192
+ m_Height: 192
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 144
+ m_Height: 144
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 96
+ m_Height: 96
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 72
+ m_Height: 72
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 48
+ m_Height: 48
+ m_Kind: 0
+ m_SubKind:
+ - m_Textures: []
+ m_Width: 36
+ m_Height: 36
+ m_Kind: 0
+ m_SubKind:
m_BuildTargetBatching: []
m_BuildTargetShaderSettings: []
m_BuildTargetGraphicsJobs: []
@@ -584,7 +773,24 @@ PlayerSettings:
webWasm2023: 0
webEnableSubmoduleStrippingCompatibility: 0
scriptingDefineSymbols:
- Standalone: FUSION_WEAVER;FUSION2;FUSION_2;FUSION_2_0;FUSION_2_0_12;FUSION_2_OR_NEWER;FUSION_2_0_OR_NEWER;FUSION_LOGLEVEL_INFO;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_3_2;ODIN_INSPECTOR_3_3
+ Android: DOTWEEN
+ EmbeddedLinux: DOTWEEN
+ GameCoreScarlett: DOTWEEN
+ GameCoreXboxOne: DOTWEEN
+ Kepler: DOTWEEN
+ LinuxHeadlessSimulation: DOTWEEN
+ Nintendo Switch: DOTWEEN
+ Nintendo Switch 2: DOTWEEN
+ PS4: DOTWEEN
+ PS5: DOTWEEN
+ QNX: DOTWEEN
+ Standalone: FUSION_WEAVER;FUSION2;FUSION_2;FUSION_2_0;FUSION_2_0_12;FUSION_2_OR_NEWER;FUSION_2_0_OR_NEWER;FUSION_LOGLEVEL_INFO;ODIN_INSPECTOR;ODIN_INSPECTOR_3;ODIN_INSPECTOR_3_1;ODIN_INSPECTOR_3_2;ODIN_INSPECTOR_3_3;FIRST_PERSON_CONTROLLER;THIRD_PERSON_CONTROLLER;ULTIMATE_CHARACTER_CONTROLLER_SHOOTER;FIRST_PERSON_SHOOTER;ULTIMATE_CHARACTER_CONTROLLER_MELEE;FIRST_PERSON_MELEE;ULTIMATE_CHARACTER_CONTROLLER_UNIVERSALRP;INVECTOR_MELEE;INVECTOR_SHOOTER;INVECTOR_BASIC;DOTWEEN
+ VisionOS: DOTWEEN
+ WebGL: DOTWEEN
+ Windows Store Apps: DOTWEEN
+ XboxOne: DOTWEEN
+ iPhone: DOTWEEN
+ tvOS: DOTWEEN
additionalCompilerArguments: {}
platformArchitecture: {}
scriptingBackend: {}