Open Level, set character position?

I have two identical levels with different day/night light bakes. I want to be able to switch between the two with a keypress. Easy enough. However, I want to transfer over my current character location into the level load (so that I’m in the exact same place when I load the new level).

Is this possible?

Thanks!

Why bother changing levels if they are identical? Just manipulate the sky sphere on button press and you won’t need to worry about relocation

You’re going to encounter a load moment switching levels unless you use level streaming (currently by default single-player only).

Going this route you’ll need to hide/show the levels based on some logic.

Teleporting is simple enough. Use SetActorLocationAndRotation node.

The light bakes are different.

Simple!
Step 1: Load the player’s current transform (or full state if you want,really its not hard!) into the GameInstance class
Step 2: Open the new level
Step 3: Set the player’s transform on the event begin play (of the level or character BP ) that you grab from GameInstance (be sure to make a check that there are actual stuff inside the gameinstance(for example test that location and rotation != 0,0,0)

I don’t know why this was downvoted… You have to load a new level unless you use level streaming. It’s just how UE4 works.

You could load both and switch between if you like consuming massive amounts of RAM

Thanks! I think I’m getting close, just need some clarification.

Here’s what I have so far:

I seem to be setting the transform correctly, as I am seeing it update with my print string. However, I’ve yet to successfully ‘appear’ anywhere other than the default starting location. I know the issue: Is Valid. I know that isn’t the right node (I can’t plug a variable into it), but I can’t find the correct way to check whether my variable is null. I think that if I get that going my BP will work.

Also, I currently have a flipflop set up for my level load (alternating between the two). I don’t think this will work correctly (and if it does, I’m sure it isn’ the best way to go about it). How would I check to see which level is loaded, and then load the opposite? Make sense?

Thanks!

you need to actually check wether your transform has been set. For example set it to something default for the first time (like the default start position) and then just set the transform on begin play for each next time normally.

Ian80 did you ever get the blueprints to works? Planing to do somthing similar.