I put a lot of work into this series and I hope you play them. All together there is 60 distinct levels and three boss fights. If you have an hour and half on your hands play this!
Its fairly complex but I’ll try to explain it the best I can. I constantly check if the player is overlapping within the portal and if they are I have a distance within portal variable. This variable can change based on how close they are to leaving either side of the portal. If variable’s value is closer to zero than 1 then I know the player is in the portal. And I use a render to screen loop from the sprite utilities extension to render a fake player on the other side of the portal with help from the distance within portal variable. (that’s why the play is only animated on one side of the portal.) Finally I check which direction the portals are facing and from here I can rotate the fake player to make it look authentic. I also use the portal direction to reroute the player’s velocity. All my code for the portals was greatly inspired by @richard. Here is their demo →
I’m hilariously aware of that skip . My friend found it the day I released it and I still haven’t updated the game. I will eventually but if I was to update the link due to how the settings extension works it would erase all the level progress of players. I’ll probably fix it in a few days so be warned.
Also, you can skip through into green portal if you have a portal above and below the green portal, and move towards the green portal you clip into the portal before the gree portal disapates