First-person psychological horror — Unity 6 + C#
[← Back to Portfolio]A first-person psychological horror game made in Unity 6. It started as a class project for GDD-211 and turned into something I'm genuinely proud of. I was the only Unity developer on the team — every room, system, script, and interaction is my work.
The game has nine interactable types, multi-state door logic, a dialogue system, an enemy AI with raycast-based defeat detection, two full ending sequences with camera clamping and fade transitions, a ScreenFader singleton used for scene-safe teleportation, and a final cutscene that coordinates six simultaneous systems in one coroutine.
if (Physics.Raycast(_cam.transform.position, _cam.transform.forward, out RaycastHit hit, interactRange, interactLayer)) { _current = hit.collider.GetComponent<Interactable>(); interactPrompt.SetActive(_current != null); } if (Input.GetKeyDown(KeyCode.E) && _current != null) _current.Interact(this);
void Update() { if (!_active) return; Vector3 target = _player.position; target.y = transform.position.y; // locked Y axis Vector3 dir = (target - transform.position).normalized; transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(dir), rotationSpeed * Time.deltaTime); transform.position = Vector3.MoveTowards( transform.position, target, chaseSpeed * Time.deltaTime); }
public IEnumerator FadeAndTeleport(Transform player, Transform destination) { yield return StartCoroutine(FadeOut()); player.position = destination.position; player.rotation = destination.rotation; yield return StartCoroutine(FadeIn()); }
StartCoroutine(FlickerLight(lanternLight, 1.2f)); yield return new WaitForSeconds(0.8f); StartCoroutine(RotateDoor(finalDoor, -110f, duration: 1.0f)); yield return new WaitForSeconds(1.2f); _timothyAI.Activate(); AudioManager.Instance.PlayChaseMusic();