Added terrain distance agent input