This is how I see it (transition):

So when I move player to the linked portal, I set his new position to the linked portal position, but with offset which is relative to the first portal (so it's like mirroring his position relative to the portals, cause they are the same).

BUT I have two problems in my head with all this...

FiRST - how do I transit other objects, I mean how to handle visual part? I need to duplicate them, so it looks like object actually passing through the portal. To do this, I need to cut the object which penetrates the portal, and the rest of it in the linked portal as well (part which still didn't go through the portal yet).

Take a look at this picture.

Sure, I won't need this for the player (as he won't see himself in the game mechanics that I'm thinking off), but for other objects I will need them, especially in situations when the portal let's say placed in the middle of the room, so it's backside is visible.

SECOND - is performance. I imagine this like: view for each portal, view that shows what linked portal currently sees (relative to it's position and angle). But this is going to be pretty slow I guess... What do you guys think??


Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung