The en passant rule for pawns can be thought of as an 'attack of opportunity', such as in D&D - the attacking pawn would have been able to take the moving pawn as it passed through the first space.
When thought of this way, an obvious idea for a variant would be to generalise this by allowing the same behaviour in all cases, i.e. if during their journey a piece passes next to another piece that could have taken it, the next player has the option to invoke 'en passant' and take the piece where it would have been. Knights would be immune, as they 'jump' and thus do not pass through intermediate squares.
My question is, does this variant already exist, and/or is there a reason why it wouldn't work?