initial object distance logic