Man I'd love to know how to do this. I've seen you mention proxys and such but is it basically well hidden transition when colliding with a trigger then basically moving to another levels? But idk how you show things in the portals with such depth, fascinating...
A lot of projection math! But also a lot of tweaking! Even still there are some glaring inconsistencies between the real Orbo and the proxy Orbo when rendered through the portal, so I still have work to do to get it cleaner.
So the way it works is that while the player entity itself is within range of the portal threshold, a duplicate Orbo is made on the other side to create the illusion that he's crossing the threshold seamlessly. The camera isn't the driving factor in the proxy since the (1/3)
player might push the camera through first, in which case Orbo's actual body could still be on the entry side. The solution here was to project the camera's desired position through the portal and look back through it, which renders the actual player entity, but through the portal surface. (2/3)
By chaining these things together it can make the transition appear seamless, regardless if Orbo or the camera goes through first. The video fails to demonstrate the camera going through first unfortunately lol (3/3)
This rules! I've played around with portals before, specifically in Godot. Is this in Unity? Are you using the rendertexture method as in Sebastian Lague's video or something else entirely?
In a perceptual sense it counts because like, Orbo is physically entering spaces in a way that appears to be impossible, but the mathematics driving it are pretty much a bunch of smoke and mirrors. Like, this isn't a fully sound physics-based integration or anything like that!
As of right now Orbo is the only WorldObject entity that's allowed to perform this action. I could add support for others, but that'll likely be a case-by-case thing depending on whether or not I actually need em to support this kinda thing.
The intended use for this system is probably going to align more to something like Psychonauts 2, which doesn't utilize portals in the same way a game like Portal might. It's more about having control over space that allows you to achieve some really neat setpieces that'd be impossible otherwise
Comments
Wishlist the game here!!