Posts

Showing posts from April, 2025

Portal2 & Player Setting

 So after getting the portals to look good, I moved on to making them actually work — meaning: when a player walks into a portal, it should load the next scene. Simple, right? Kind of. First Attempt: One Player Per Scene (Disaster) At first, I had a separate player prefab in every scene. It made testing easier, especially for checking colliders and first-person movement. I was focused on making sure the mesh colliders and terrain felt right under the player’s feet. But once I added actual scene switching , everything broke. Whenever I moved between scenes, Unity would load the new one with its own player object — meaning I suddenly had two players in the same project, sometimes both active. It led to all kinds of bugs: camera confusion, overlapping controls, audio source conflicts… total chaos. The Fix: Keep the Player in the Main Scene I turned to ChatGPT (again) and followed a smart suggestion: only keep one player , and manage it from the main scene. Now, instead of...

Portal1

Image
After setting up the door dialogue system, I moved on to building the portal system inside each sub-scene. My original plan was to recreate the same kind of portal effect I tested earlier — where a portal surface shows a real-time view of another location using a second camera and a shader material. This worked well within the same scene . The Problem with Multi-Scene Portals The problem came when I tried to apply the same technique across different scenes . Since Unity handles scenes separately, the camera in one scene can’t "see" objects in another scene unless both scenes are loaded additively. Otherwise, the render texture just shows black. I tried a few workarounds, like loading both scenes at once or faking visibility, but nothing looked quite right. Eventually, I decided to ditch the live portal view and try a different approach. Plan B: Depth-of-Field Fakeout Instead of using a live camera feed, I set up a static plane in front of each portal and used a depth-o...

Adding Story and Dialogue in Unity

After finishing the background video, the next step was getting it into Unity and making sure players could actually watch it — or skip it if they wanted to. I didn’t want to force anyone to sit through it every time, so I added a quick escape key feature: if you press Esc , it jumps straight to the next part. Once the video ends (or gets skipped), the screen fades into an image with three doors. Each door represents a different scene the player can explore. Pretty straightforward. The idea was that clicking on a door would trigger a short dialogue, giving players a little context before they step into that world. The Setup Here’s what I planned: Video plays at the start Image with three clickable doors appears Click a door → Start a short conversation Finish the dialogue → Load the related scene Sounds clean, right? But it got messy. The Problems Problem #1: The disappearing dialogue panel At first, everything looked like it was working — the video played, the do...