Stepping through a portal at a jump's speed and leaving in the right direction
A portal that keeps momentum is a joy: fall into one in the floor and shoot out of a wall. It goes wrong when the direction is not turned with the portal, when a slow fall drops back in, or when the character is thrown straight back into the entrance. Here is the turn and the minimum.
Why this works
Going through a portal should keep the feeling of the motion. Turning the velocity by the difference between the two openings keeps the speed and sends the player out along the new opening, so a fall into the floor can leave a wall as a throw.
When not to use it
Avoid it in puzzles where the player must predict the exit from a still picture; a spinning velocity is hard to read. Then use portals that stop the player first and place them gently on the other side.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 30 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Stepping through a portal at a jump's speed and leaving in the right direction" (read_entry portal-keeps-the-jump-speed) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP