Add a function to constrain the particles into the corridor (assumed with walls parallel to the x axis.)