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.
asked May 16 '17 at 05:00 PM in Blueprint Scripting
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here