close objects ?

What i want to do is learn when one object is about 1-2 meters closer to the other object?

but I don't want to do this by measuring distance with the sensor.

I want to do this like nfc system but nfc I guess it doesn't support 1-2 meters.