The Door Problem: XB2001
(3/5)
Testing Portal Mechanic
I have decided I will be making my door scene using a portal mechanic alongside a locked door where the player must retrieve a key to open it, also a switch for a cupboard-type door where the key will located.
Before designing my scene, I have prepared all the necessary Blueprints in UE4 so I am able to easily add them into my level.
The First Portal Blueprint Attempt (somewhat failed)
I did a bit of research online on how to create a portal, and came across a video tutorial. Although the portal mechanic worked, I had issues when the end portal had a different rotation to the first portal walked through, as I struggled to get the player to rotate to the same direction as the target exit was facing.
As you can see, I also had some issues with the visuals, including them being very expensive to run.
These were my Blueprints:
Link to tutorial used: https://youtu.be/F28NKqG7ce8
After trying out this tutorial, I went to my course tutor for help who showed me a different method of creating a portal, one where the player rotation change worked as well...
The Second Portal Blueprint Attempt (success!)
This method seemed to work much better. The only change here was that we aren’t teleporting back from the teleport location, as I don’t particularly need this anyway.
Here’s how it was done:
Two new blueprints were created: the Teleport and the Teleport Location
Teleport BP
A simple door frame was added as well as a box to trigger the event. A variable was also added and made visible (”Instance Editable” or the eye symbol next to variable checked) so the teleport location object/blueprint could be referenced in the blueprint.
The blueprint event graph for Teleport BP
Teleport location BP
For this blueprint, you can see another Static Mesh door frame has been added, alongside an Arrow which we will use to dictate the player’s rotation change (as seen referenced in the Teleport BP Event Graph).
The area I have circled in green shows the variable that was created so that I can reference it to the Teleport Location in the world map, like shown below.
The area circled in red shows a reference to the Arrow used in the Teleport Location BP so we can impose the rotation of the player with the arrow.












