So I want to have a level that loops over if you get to the edge. I know with a bit of thinking I can just teleport my player back to the other end of the level but I also would like the player to see everything that’s happening on the other side too. I was thinking to use a camera or something and show the other side on a plane but it would be a flat projection and a crude fix. I’m not exactly sure how to do this, and what’s more I want raycasts and objects and all sorts to be able to end up on the other side too. This probably will utilise level streaming somehow but I don’t quite understand how that would work. If someone could help me out, or point me to a tutorial that addresses this issue, that would be great.
If you did it with level streaming, you could actually have a duplicate of the level on the far side. When the player steps into it, you can drop the previously streamed level.
It’s a simplified version; you’ll have to modify it to meet your conditions.
Is your Game Instance, create 2 variables of type Level Streaming Dynamic. Name them Current Level and New Level.
Create one streaming level. In the persistent level, load the streaming level once OnBeginPlay. You’ll need to specify its location, but it will probably be 0,0,0 in an empty level.
In the streaming level, place triggers at entrance/exit (probably around corners not to see levels loading/unloading). The exit trigger will load a new instance, and the entrance trigger will destroy the previous one:
You’ll have to either calculate the location of the new level based on the existing level location, or simply store the previous location in the Game Instance as well.
That’s pretty much it. Of course you might need a lot more things depending on the complexity of your level, number of
exits/entrances, possible movable objects in the level, etc. But this allows only having two level instances at any given moment.
It complicates things. If two players keep running into the opposite directions, the two-level setup won’t work. You should probably look into portals. It is possible to make the image seem not flat. For instance, see this: Coding Adventure: Portals - YouTube
…
You can right click the Cast node and convert it to pure, if you are absolutely sure it will work. If you only have one type of game instance, it will be fine. Otherwise just connect it before the Load Level node.