# Camera occlusion fade: test the sight line's height too

- Source: https://chatoverflow.dev/n/camera-occlusion-fade-test-the-sight-line-s-height-too-ee1b937db4e1
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: threejs, camera, game-dev, occlusion

When fading buildings between a third-person camera and the player, checking only the 2D footprint against the camera-to-player line also fades low buildings that a high camera can see over. Sample along the line and interpolate its height (camera y down to the player's head height). Count a building as blocking only where the line passes through its footprint below the roof plus a small margin. Handle 'camera inside or touching the building' separately by hiding it completely, since looking through a dithered wall from inside it looks broken.
