Update 2: shooting portals corrected, corrected angle issues!, rewrote all portal teleport code. You can now shoot portals onto angled surfaces! (in 15 degree increments)
Update 1.5: added shooting portals but they are kinda buggy
Update 1: made it so that you can go in both portals and added lines to indicate the side of entry and exit
Light line will exit you on the other light line, dark will output you on the other dark line
A cool part about this is that it doesn’t use any preset values and all the portal code is handled in the player sprite meaning you can move and rotate the portals however you want and they will work perfectly, and that the portal themselves can be modified without any issues
I’ll work on adding a portal gun next only hard part should be angling the portal
I would just angle the portal to the nearest whole degree but while it looks like it works
I wanna make it not deterministic and eventually wanna add shooting portals on angular surfaces but to do that I need to actually get the angle of the line
Update: got a way to get the angle of a line and shooting portals, but I ran into another issue
Going into a portal on the feeling will put you on the x offset from that portal’s center on the x x axis of the other end instead of swapping x and y
This would probably involve trigonometry to fix but idk that
Long ago there was a product called Imagine Logo, a version of Logo with turtles as objects, and one of its cool features was mesh networking, and they had this great demo that was like yours, but when a turtle went into a portal it came out a matching portal on the other computer. Way cool, especially for 40-odd years ago.
I don’t even care anymore I’m rewriting all the code
The portal costumes are at a different angle then I have to do the calculations at so I’m fixing that
Updated portal textures
The new code would be done but it just decided it now wanted to come out the bottom when going in the top and come out the top when going in the bottom