This commit is contained in:
WillJeynes
2026-08-30 01:06:54 +01:00
parent 4158e7acac
commit 4eafb65db9
4 changed files with 695 additions and 9 deletions
+12 -4
View File
@@ -56,6 +56,8 @@ public class CameraController : MonoBehaviour
private float currentFocusOffsetX = 0f;
private bool isSequencePlaying = false;
public GameObject globalLight;
void Start()
{
if (explorationCamera != null)
@@ -171,7 +173,7 @@ public class CameraController : MonoBehaviour
RemoveHighlight();
activeDoor.transform.FindChildRecursive("DOORPANEL").gameObject.GetComponent<Renderer>().material = activeDoor.openMaterial;
// 1. TRIPWIRE: Check if the slots are empty!
if (activeDoor.type == "DEATH")
{
@@ -198,22 +200,28 @@ public class CameraController : MonoBehaviour
activeCam.Priority = 30;
yield return new WaitForSeconds(1f);
// --- DISTANCE MOVEMENT FIX ---
// Using real metres now! 5f means 5 metres per second. Adjust this if it falls too slowly!
float pushSpeed = 5f;
float previousPosition = -1f;
float counter = 0f;
while (activeDoor != null && activeDolly != null && activeDolly.CameraPosition > previousPosition)
{
previousPosition = activeDolly.CameraPosition;
activeDolly.CameraPosition += pushSpeed * Time.deltaTime;
counter += Time.deltaTime;
if (counter > 4f && isDeathDoor)
{
globalLight.SetActive(true);
}
yield return null;
}
// ------------------------------
string doorType = activeDoor != null ? activeDoor.type : "";
// --- PRIORITY FIX ---
if (doorType == "LIFE")
{