I have a problem and I am not sure the best way to implement it.
I have two levels—a level is a scene—and each level has a door. A door from one level is connected to the other: I would like to link these door nodes so that if the player goes through one door it should spawn near the door of the other level. I was thinking something like:
- giving door ids, so connected doors have the same id
- when a level is changed and a door is passed, the door id is passed
- find the door by id on the new level
- spawn by the door position
But I've never done this before, so I was wondering if there is a better solution for something like this.