Except for, say, Clairvoyance, which despite having a range of 1 mile also explicitly says that you can cast it "behind a door".
There's an exception to every rule, including this one.

Except for, say, Clairvoyance, which despite having a range of 1 mile also explicitly says that you can cast it "behind a door".
You cannot target something that has total cover. If you try to place the point of origin at a location that is behind total cover, the point of origin becomes the near side of the total cover. A Wall of Force provides total cover. You can't target things inside it. If you try to place a Fire Elemental on the other side of a WoF it appears on your side.
I think the rules for cover and line of sight need some work.
For example, replace "wall of force" with something else that allows vision - a piece of glass.
Can you summon an elemental on the other side of a glass window? Can you cast create bonfire on the other side of the glass window? Can you target someone with a bow if they are behind a glass window?
I worry that if you answer "no" to these, then a simple pane of glass provides immunity to a lot of spells. Worried about magic missile or charm? Just ride in the Popemobile. Or a gelatinous cube.
Worried about arrows? Sit behind a metal wall with invisibility cast on it. The archer can't target you or the wall.
No, you can't target someone behind a window with a bow. But you can aim at them, and you'll hit the window and break it. I think it would be asking a lot to expect to then hit the creature as well.I think the rules for cover and line of sight need some work.
For example, replace "wall of force" with something else that allows vision - a piece of glass.
Can you summon an elemental on the other side of a glass window? Can you cast create bonfire on the other side of the glass window? Can you target someone with a bow if they are behind a glass window?
Magic missile can't target objects, so glass would protect you. Charm person would not break the glass so you're also protected. Until someone throws a rock and breaks your glass.I worry that if you answer "no" to these, then a simple pane of glass provides immunity to a lot of spells. Worried about magic missile or charm? Just ride in the Popemobile. Or a gelatinous cube.
The archer could target the wall, but probably not to much effect. Why would you not expect this setup to protect you from arrows? There's a reason the pope uses the popemobile, after all.Worried about arrows? Sit behind a metal wall with invisibility cast on it. The archer can't target you or the wall.
EXACTLY! No casting spell through glass windows! Ugh.
I've just thought of something else:
No casting spells while wearing spectacles!