Wormhole / teleport for Portal 2-like game

Hello! I am trying to make a game like Portal 2, but cannot figure out how to do the wormhole thing. Is this possible? Can the camera somehow teleport while keeping its original velocity? Whenever I try just setting the camera’s position to the other portal, it just keeps me in limbo between the two or spits me out one of them randomly.
Any ideas?
Thanks!
TheDiamondKiwi

Hi @TheDiamondKiwi,

That happens because when you reposition camera to other portal, it immediately collides with it and then repositions to the first one and so one.
You can create a variable and set it to false for a small time after portal. I made a prototype for you, feel free to remix it and explore the code

Thank you so much! Is it possible to keep the camera’s velocity when traveling between portals? If not that’s ok.

The camera velocity cannot be calculated and set from the code

i was wondering something some what similar. i was wondering if it is possible to make a portal but you can see whats on the other side

You can use the Mask feature to peer through objects, however objects on the other side (except for the environment) will be invisible. So you could flatten a cylinder into a disc, set it to Mask, snap it to a wall, and hey presto, you can see through the wall (but you can’t see anything on the other side).