Portals with a view or a TARDIS effect

So lets say I want to make a TARDIS from Doctor Who. I’ve got the box with a doorway on the front. I can make walking through the door teleport the player to an otherwise inaccessible room hidden somewhere on the level, but how can I make it so that you can see “inside” the doorway to what’s actually going on in that room? As in a full 3d when looking at it from the front.

In the sample content provided by epic, there is a level streaming example that uses colliders to load sub levels when you get close. That would then allow you to either move the Tardis into the collider to load different levels from a fpv or if the Tardis is in a fixed position then a collider in the Tardis would load a level as the door opens

Hope that points you in the right direction

I believe there is a security camera that works in the Office Blueprint example.

You can start by looking at this example, this renders a camera to a 2d texture.

Now obviously, this will not make it perfect since the camera is static and you are moving, so no perspective changes.

This could be fixed though by moving the camera for the portal around based on various calculations based on where you are and where the portals are… Not impossible at all

Thanks ! I was looking at that a bit, but it’s the 3D effect that I was trying to figure out, I didn’t think of trying to orient the camera along with the player, but that might be a way…

Regarding the level streaming, the issue is more “seeing” what’s going on in the level, I might want to have animations or particle effects already running in the Tardis, that you can see from the doorway before you enter, hence my thought of it being better to have it as a hidden part of the current level, rather than loading a different level when you cross the threshold.

Orienting the camera is only part of it. To make it look really good you also need to change the field of view as you move closer and further. When you’re far way from the portal, the field of view you have through it is smaller than when you are close.
This is actually going to be the hardest part I think. You need to get two vectors from your players perspective, get the vector to the left side and the right side of the portal… and then calculate the viewing angle from that using your own distance to the portal… again, it is totally doable, but you need a bit of math.

Ah yup, you’re right in that one. Well not sure if I’ve got the math for it, but I’ll give it a shot, it ought to be interesting. Shame there’s no easier way to pull that sort of thing off.

Well… it might not be too hard.

Your Portal is going to be a Blueprint… so part of this should be 2 targets on either side of the portal.
Line trace from player to both targets and get the length.
You already know the distance between your targets.

3 sides is enough to calculate the angle.
76993df8ec06da192716d7663bf32369.png