Called whenever the controller is moved.