how big are these 'objects'? Could you mount 2 groups of ir leds on them and use a wiimote camera to detect them? Then measure the distance between them.
From my experience I think you'd need the 2 IR lights say 1m apart. Bit of a guess but gives you some idea to work with.
I wouldn't dismis ultrasonic too easily - the limiting factor with ultra sonic is the fact that you'r relying on the reflection of an object hitting the sensor ( a very small sensor! ),If you work out the fraction of the original signal that gets returned to the sensor you soon see why the range is limited.
if you could have a second slave device on the other object that would simply parrot the ping back you could significantly boost the range of ultrasonic. Kind of an active reflection rather than a passive one...