The issue happened because of not resetting lastTick: The lastTick is stored to
calculate movement speed independent of frame rate. When paused, the delta is
calculated with the time before the pause, so it gets huge and results in high
velocity values that are used to calculate how far the player moved.