Frame of reference. If a person is hit by a train, from their perspective, they were standing still and the train was moving. But a person in the train can stand up and walk around without difficulty, they can stand on one foot and balance, they can jump up and down and not go flying away; so they are standing still from the trains perspective, it’s everyone and everything outside the train that’s moving.
What happens isn’t a transfer of momentum or energy or velocity; it’s a change in the frame of reference. That can’t happen in real life and breaks a lot of different laws of physics, so people are having trouble wrapping their brain around it.
The portals are a frame of reference. Both the IN and OUT portals have their own, separate frame of reference. The player’s reference doesn’t actually factor into it. When you go through a portal, you are switching from the IN frame of reference, to the OUT frame of reference. And in this situation, the IN frame of reference has you flying toward the portal at whatever speed it’s approaching you.







From the orange portals frame of reference, the cube, and everything else in the world, is rushing toward it. So the cube (as well as the entire world around it) has a velocity relative to the orange portal.
But only the cube goes through the portal, the rest of the world does not come with it. At that point, the frame of reference changes. You can think of it like this: The cube has an velocity of X with respect to reference frame Y; once it leaves the portal, it keeps that velocity X but the reference frame changes from Y to Z. The velocity doesn’t disappear.