Camera overlaps and teleportation

Hi, I am trying to replicate the portal effect from VALVE’s game “Portal” (I am sure you’ve heard of it and understand what I am talking about). I have gotten the portal rendering down but now I am trying to script the portal teleportation and I have one big issue.

I cannot simply teleport the player to the portal location once the player overlaps because it ruins the smoke and mirrors effect (portal teleportation doesn’t look seamless) so I have to come up with a different method… and I have. Each portal has a camera attached to it (that moves relative to the player) and I basically want to move the player camera to the portal cameras position once the player camera overlaps the portal plane.

How do I make the portal plane ignore the player collision capsule component (I am using the FPS template) and only overlap once it collides with the player camera component? And also, how do I teleport the player camera to the portal camera position ALONG with the rest of the player (the player camera is a child component so if I teleport that specific component I assume that the rest of the components wont follow?)

Note: I also want the portal plane to overlap with ALL other objects in the scene… just not the player capsule component itself.

You want much ))

Well, I tried to make some portals to grow my knowledge, and here is my tutorial about.

For now I’m working on update for this tutorial and example project, which includes seamless teleportation. But you can’t make it really seamless because of rendering.

Valve renders portal view with stencil buffer and directly to screen.

Scene Capture renders portal view to texture that simply mapped to some portal plane. As you maybe know, player camera have near clip plane distance = 10 units, and when it closer than 10 units to anything, it will clip it.

So, to avoid portal’s surface clipping, you must teleport camera at least at 15 units from 1st portal to 15 units from 2nd portal. This is a little bit noticeable anyway.

Btw, I’m using PlayerCameraManager for camera calculations with “BlueprintOverrideCamera” function, and without camera component in player character. This allows me to avoid problems with camera relative location/rotation to player character and set world camera transform directly.

Well, if you wait few days for my update for tutorial, you will get example project with already implemented “seamless” teleportation.

Thanks for the tutorial! Seamless teleportation however seems to be possible in UE4. I have seen several people on Youtube who have achieved this.
This guy for example: Unreal Engine 4 Seamless Portal. - YouTube . He managed to write some sort of clip fix in BP (I don’t know how though).

But most impressive is this guy:UE4 Portal effect + mechanics tutorial - YouTube . He managed to create (almost) perfectly seamless Portals in just 7 minutes. Too bad I can’t exactly tell what he does in the very end since he doesn’t explain why he does the things he does.

By the way I also found this interesting video (definitely worth a watch): How were the portals in Portal created? | Bitwise - YouTube . In this video the guy explains exactly how the portals in “Portal” work and how he managed to replicate them in Unity.

This guy for example: https://www.youtube.com/watch?v=j7rYvPtuEFg . He managed to write some sort of clip fix in BP (I don’t know how though).

Well, maybe this is done with post process material and custom depth, but it hard to implement, specially for more than 2 portals in scene