shuffle endpoints when CoM is in a buffer zone near edge