Add distflag to test if the object should move forward or backwards