How to make portal door in the same scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By r1diq

Hello. What I want to do is make the player switch between two gates in the same scene. Watch the demo video for a better understanding

What I want is similar to what this man did, but without complication … I tried a lot to correct the code and make it suitable for me, but I did not succeed

:bust_in_silhouette: Reply From: Surtarso

you can use an “on area entered” signal on the portal and code to change player global position to the next portal global position

you could even make a pre-made single scene with 2 portals linked to one another so you just add that node to you scene any time you need 2 portals connected to each other

or a scene with just one portal and you hard-code each one individually (just the “next portal” position part)