Two Selves Bug

(160 words, 1 minute read)

While working on some quality of life improvements, I came across an interesting bug. Since the player can enter a room from either side, there must be at least two places that can spawn the player. In order to implement this, I decided to remove the player from the scene in the Unity editor and instead add two player spawn points; when the scene loads, one of the spawn points spawns the player, and the camera faces that player.

Well, that’s how it’s supposed to work in theory. When I first implemented it, I wrote the code to deactivate one of the spawns incorrectly and spawned the player twice. To my surprise, everything else worked; both players got the controls, and both players had their own artifact.

I’m not quite sure what to do with this concept, but it was definitely fun to see and to play with. It’s possible I’ll incorporate it into the game, or something like it.