# Switching levels when pressing a key

**URL:** <https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882>\
**Category:** Community & Industry Discussion\
**Tags:** teleport, level-load, unreal-engine, door, question\
**Created:** [March 26, 2020, 6:48am UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882 "2020-03-26T06:48:15Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![JustCDR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justcdr/32/945497_2.png) [@JustCDR](https://forums.unrealengine.com/u/JustCDR)\
**Post date:** [March 26, 2020, 6:48am UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/1 "2020-03-26T06:48:15Z")

</div>

Hey, i´m new to unreal engine and i hope you can help me…

So i wanted to make a door that when you press the key E you are teleported to another level without the door opening.  
i tried some stuff but it won´t teleport me.

I hope you understand me and could help me with that 😃

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 26, 2020, 10:03am UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/2 "2020-03-26T10:03:35Z")

</div>

What are you doing to make the teleport happen?

---

<div class="post-metadata">

**Author:** ![TuxTheAstronaut](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuxtheastronaut/32/1123667_2.png) [@TuxTheAstronaut](https://forums.unrealengine.com/u/TuxTheAstronaut)\
**Post date:** [March 26, 2020, 2:16pm UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/3 "2020-03-26T14:16:24Z")

</div>

When you hit E did you use the open level node and if so dose it just freeze or dose nothing happen

---

<div class="post-metadata">

**Author:** ![BrunoCaxito](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/brunocaxito/32/706161_2.png) [@BrunoCaxito](https://forums.unrealengine.com/u/BrunoCaxito)\
**Post date:** [March 28, 2020, 5:19pm UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/4 "2020-03-28T17:19:08Z")

</div>

I’m supposing you’re familiarized with Blueprint scripting and Unreal Engine fundamentals.

- Create a door **Actor Blueprint**. Customize it with meshes and materials as you like.

![298662-doorbp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/7/177c558385e5ea2f142db24b2f15346189bfc405.png)

- Add a **Collision Box Component** to your door Actor Blueprint and place It in front of the door static mesh. This box is the volume where the player Pawn has to be inside to enable the E key.

 ![298663-box.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/6/c76795ce7ec080e35f29efd8ff509d4a817626ae.jpeg)

- Add a **Boolean** variable to check if the player is inside the volume and a **Name** variable to store the target Level name. Also, check this actor to listen to inputs from player.

![298666-anotacao-2020-03-28-142025.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/6/d36250937f7413b7c744c08acb5837a8fbdc63a9.png)

- Add the Collision Box Component blueprint events to event graph to listen to **Begin Overlap** , **End Overlap** and **E Key**.

 ![298664-graph.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/7/7e718a73c7cef076370ddf90421ab19fcf8efb22.png)

- Add the door to world and set the level destination.

 ![298665-world.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/6/ea606f9fd185868995d9b33c5cf287ad85642e6f.png)

Be aware that this is just a simple and generic implementation and you may need to customize it to fit your project…

---

<div class="post-metadata">

**Author:** ![JustCDR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justcdr/32/945497_2.png) [@JustCDR](https://forums.unrealengine.com/u/JustCDR)\
**Post date:** [April 2, 2020, 2:19pm UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/5 "2020-04-02T14:19:04Z")

</div>

i don´t remember what i tried, but my idea was that when you are outside the house and go to the door and then press E to enter it, that you get loaded in another level which is basically the house from inside. And then when you are inside and press E again at the door, that you get loaded into youre normal level back again.  
(i´m trying to make it look like a old ps1 game)  
I hope you can help me with that

---

<div class="post-metadata">

**Author:** ![JustCDR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justcdr/32/945497_2.png) [@JustCDR](https://forums.unrealengine.com/u/JustCDR)\
**Post date:** [April 2, 2020, 2:19pm UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/6 "2020-04-02T14:19:09Z")

</div>

Nothing happened.  
I´m a little bit new to this so i don´t really know how to create a door like this.  
all i have right now is a normal door that opens, and i wanted to create another one which loads you into another level.  
If hope you can help me with that.

---

<div class="post-metadata">

**Author:** ![JustCDR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justcdr/32/945497_2.png) [@JustCDR](https://forums.unrealengine.com/u/JustCDR)\
**Post date:** [April 2, 2020, 2:22pm UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/7 "2020-04-02T14:22:48Z")

</div>

nothing happened.  
I´m new to this and the thing i wanted to create is a door and you have two levels. (first level is outside a house where you can walk around the world, and in the second level you are inside the house)  
When you are in the first level and press E at the door to enter the house, you will be loaded in the second level where you can either do some stuff inside the house or press E again at the door and it will load you in your normal world outside the house.

---

<div class="post-metadata">

**Author:** ![JustCDR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justcdr/32/945497_2.png) [@JustCDR](https://forums.unrealengine.com/u/JustCDR)\
**Post date:** [April 2, 2020, 2:22pm UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/8 "2020-04-02T14:22:57Z")

</div>

nothing happened.  
I´m new to this and the thing i wanted to create is a door and you have two levels. (first level is outside a house where you can walk around the world, and in the second level you are inside the house)  
When you are in the first level and press E at the door to enter the house, you will be loaded in the second level where you can either do some stuff inside the house or press E again at the door and it will load you in your normal world outside the house.

---

<div class="post-metadata">

**Author:** ![JustCDR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justcdr/32/945497_2.png) [@JustCDR](https://forums.unrealengine.com/u/JustCDR)\
**Post date:** [April 2, 2020, 2:26pm UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/9 "2020-04-02T14:26:11Z")

</div>

Thank you everything worked.

Have a nice day 😃

---

<div class="post-metadata">

**Author:** ![MicheleSmith](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MicheleSmith](https://forums.unrealengine.com/u/MicheleSmith)\
**Post date:** [December 9, 2023, 2:37pm UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/10 "2023-12-09T14:37:13Z")

</div>

Hi, I’, trying to do something really similar in ue5.3 and it’s not working. It works in the viewport (“press M to go to level 2” works) but then when packaged, it just transports the player back to the start of the same level (level 1). Any other workarounds to accomplish the same task?

---

<div class="post-metadata">

**Author:** ![koshikaa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@koshikaa](https://forums.unrealengine.com/u/koshikaa)\
**Post date:** [December 16, 2023, 7:51am UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/11 "2023-12-16T07:51:58Z")

</div>

my idea was that when you are outside the house and go to the door and then press E to enter it, that you get loaded in another level which is basically the house from inside. And then when you are inside and press E again at the door,

---

<div class="post-metadata">

**Author:** ![JustCDR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justcdr/32/945497_2.png) [@JustCDR](https://forums.unrealengine.com/u/JustCDR)\
**Post date:** [December 27, 2023, 1:25am UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/12 "2023-12-27T01:25:41Z")

</div>

Hey, could you check over if the level is set to the correct level? If so would you mind maybe adding a screenshot?  
Good luck! 🙂

---

<div class="post-metadata">

**Author:** ![XTP\_XTigerplayer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xtp_xtigerplayer/32/492230_2.png) [@XTP\_XTigerplayer](https://forums.unrealengine.com/u/XTP_XTigerplayer)\
**Post date:** [April 15, 2025, 2:49am UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/13 "2025-04-15T02:49:38Z")

</div>

Hey, I tried this, but now I am teleporting to the next level by pressing E on any part of the map, how do I fix it so that you can only teleport into the next level by being inside the collision box?

---

<div class="post-metadata">

**Author:** ![JustCDR](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justcdr/32/945497_2.png) [@JustCDR](https://forums.unrealengine.com/u/JustCDR)\
**Post date:** [April 20, 2025, 4:07pm UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/14 "2025-04-20T16:07:45Z")

</div>

Hi,  
make sure you have a bool in the door BP to check if the player is currently in the trigger (and check if it’s false by default).  
Then when On Component Begin Overlap the collision box you set the bool to true and On Component End Overlap you set the bool back to false.  
Then when pressing the button (“E” in this case), just simply branch the bool and open the level if it’s true.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![itsNikolaj](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@itsNikolaj](https://forums.unrealengine.com/u/itsNikolaj)\
**Post date:** [October 12, 2025, 9:41pm UTC](https://forums.unrealengine.com/t/switching-levels-when-pressing-a-key/462882/15 "2025-10-12T21:41:09Z")

</div>

Hey everyone the blueprint works, but when I put 2 door blueprints with different destinations, only 1 of them works, seems like the newest one created. Does anyone have any ideas on how to fix this issue?
