Detecting object passing through gateway
You can generate a line with a laser using optics. You can focus that line on an array of photodetectors, and detect when the golf-ball-sized object breaks the plane.  There are many variants of that idea. The geometry and opticsmight get a bit complicated to  cover your whole space.

There are many variations.  For example, Instead of a line laser, you could use splitters and mirrors to create a span of parallel rays fine enough to detect your object.