How did the Vanishing of Ethan carter do teleportation?

Do you mean something like this:

This could help you:

Although this method was stated as less optimal. Maybe you come up with a better way.

I’m trying to make an endless forest path where the player is always returned to the path and the path loops.
I was wondering how the Vanishing of Ethan Carter handled teleportation during the magical room switching house because I think I could use that for my game.