attached mode based on distance