Gammas tend to act more like particles in the detector. They don't stop all at once, they tend interact multiple times and deposit their energy in multiple places along a line via a ton of different physical interactions. My description was simplifying and conflating things a bit, you can look up optically segmented detectors, as well as Compton scatter cameras if you want a better answer. There are other imaging approaches, too.