I'm just going to buy one ship a month...


Another [increasingly] large aspect of my game design is portals and the manipulation of the world they allow. I picked up a VR Portal asset in a recent Unity sale, but it proved more trouble than it was worth - performance nose dived to single digits. It didn't get on well with some of my more interesting code as well.

GitHub to the rescue, and I found some examples and cobbled something together which gives very good performance. The VR integration isn't great, I'm getting some seriously exagerated stereo visuals going on that I'll work through. The basics work though, realtime cameras setup, lots of crazy shit going on.

What I really wanted to do, however, was allow objects to correctly pass through the portal. I got the character "faking" it easy enough - come to the portal, instantly disappear, re-appear at the associated / other portal. However, I wanted cool stuff like platforms moving through them. And I wanted my portals to be maniuplated, so you can angle them, and even have one on a VR hand Smile

This took a while. I had to split the platform which passes through in half, creating two items out of the one. The main issue was aligning things correctly between portals, so these two items are relatively correct to one another and match up visually through the portal camera.

I spent.... a long time on this. Weeks. Loads of iterations, throwing all kinds of ideas at the problem and being unable to resolve it. Then earlier, a moment of "Why don't I just...." and it's working. In 9 lines of code Smile

Lots of issues - the platform mesh in this example is only 12 triangles, so lots of artifacts and lighting issues when I divide it. I think a more complicated model will work better, as strange as that sounds.

And it only works for standard mesh, nothing "skinned" - so no characters of animated items. I've a few idea on that, will see how performance goes, but if that fails, I can do a "hard teleportation" with the character.

I have so many ideas of how this can go, really excited to put these into a test level. I think once I get going designing levels with portals, new ideas will spring up. Very exciting Biggrin