Arrow keys to move about ========================================= Trigonometry-based to create a portal system that keeps your direction and velocity, instead of just moving you straight to the other portal. Only basic Trig functions, but I'm surprised by how little things you can find with this system. ================Calculations================ Velocity = sqrt(X^2+Y^2) Direction = arctan(X/Y) Teleported velocity (X) = Sine(Dir) x Velocity Teleported velocity (Y) = Cosine(Dir) x Velocity =========================================
All script is mine - if you're going to use the engine, please leave credit. ========================================= Any improvements/bugs you have? Tell me in the comments! It's not very polished yet, but i will be updating it. ========================================= Teaser for my latest game in development: https://scratch.mit.edu/projects/368479667/