Use _state_previous and _state_current in state distance function