update direction according to movement if possible