Presence detection (sub 1 meter) on a budget

I've done something similar in the past with visible light phototransistors.
Variations in ambient light or reflections from the victim kept retriggering the sensor until the person left, fell asleep or died.
My solution had a wide view, but could easily be 'choked down' with a tube of black heat shrink.
To set a reliable range of hysteresis, i used an 8-pin micro to average events over time to eliminate false triggering. It worked great. Cost less than US$3 each.