https://news.ycombinator.com/item?id=14151439
If you're in a cube I wonder if you'd be better suited to an IR-beam break? If you have to walk through an "entrance" you could detect that happening pretty easily - although you'd want to avoid flaps to handle the case of somebody leaving too.
https://news.ycombinator.com/item?id=14151439