When I first got a VR headset, I was also let down by the lack of VR mods for Portal, or games that created Portal-like gameplay in virtual reality. This was an experience I was craving so badly, that I attempted to make it myself.
To create this, I hacked together three free Unity assets I found online: a VR player controller, a VR stereoscopic render texture demo, and a basic 3D portal teleportation demo.
My major contribution was smoothly realigning the player’s UP vector after going through two portals of differing surface tilts. In Portal, they can simply change the pitch of the camera’s rotation, but in VR, you can’t do that long-term, because the camera is the player’s head! So to ensure seamless teleportation in VR, my solution was to temporarily change the camera’s UP vector based on the tilt offset between the two portal surfaces, then quickly and smoothly rotate you back upwards. Only slightly motion sickness inducing. 🙂