Advance ray at the end of the iteration