Show distance between Objects when attached to wall

It seems your project takes place on one plane?

Maybe you can take something from this example?