How to ensure that when the camera does not roam through the walls of the building model?

Hi all,
I want to show a 3D architectural scene.I had some difficulties.
1、How to ensure that when the camera does not roam through the walls of the building model?
2、How to get the height of the surface of the model?

Can someone give me some tips? be deeply grateful!