I am not certain which effect you refer too, but for wide angles lenses, esp ultra wide angle,
it is very important to take special pains to keep the camera pointed level ahead. I don't mean sideways, I mean not aimed up or down any at all. This angle would tilt the walls, makes them lean. You can see this in the viewfinder if you look for it. The trick is to keep the sensor (the back plane of the camera) exactly parallel with the walls. If you really wanted to aim up or down some, it may mean you have to later crop off some of top or bottom of the picture. And there is software now to tilt it back the other way.
If you look at the top picture, portrait layout. Building is the middle, but you say since the picture is taken closely the photographer should be on the knee to have cleaner lines. It makes sense. However with cars as my subject, I´ll better be prepare to lay in dust on parking lots most of the time.
@Kodiak thanks for the tip.