Which type
There are at least three types, fog, stream and foam.
The fog can be a little indiscriminate, and you risk getting some of it yourself.
That said, there are some very good ones, and they are fairly directional.
They involve the recipient's breathing, which the other two don't.
Think I'd carry "fog" style spray for bear or similar.
The foam works, but from personal experience you have to apply quite a bit of it, which might be tough to do with an angry, mobile adversary.
And it just seems to take a little longer.
The pepper "stream" is probably my favorite, a concentrated stream of liquid that is very directional, has decent range, and does not get in the air nearly to the extent of the "fog" style.
Can be used indoors without involving everyone else.
Does dreadful things to people's eyes though, you'll almost feel sorry for them after you've sprayed them.
No risk of respiratory distress.
The "fog" ones are handy if you are having trouble with someone following you in a vehicle, leave a cloud for them to drive through.
Would work in the same manner indoors, or in somewhat enclosed environment such as a parking garage. Fog the air, and let them walk through the cloud. Just keep in mind that it'll hang around some, and can leave oily residue on walls and floor if you use a lot.
You'll be very unpopular if you get it into a building's AC system!
Cautionary tale, thanks to a friend of mine's experiences. Don't leave them in your car on a hot day. He returned to his car to find the windows pink, from the can he'd left on the dashboard.
Took a little airing out and wiping before it was driveable.
Now if I could only get some OC that was mixed with the volatile oil in the skin of the durian fruit.............