As a Wizard building primarily around Disintegrate, I've noticed that the game often corrects the beam of my death lazer to cause appropriate amounts of death, typically when there are ramps and stairs around me.
On occasion, this has bitten me in the hiney - I'll notice that my death lazer is shooting the ground, and not the titanic monster making attempts on my life.
The horizontal angle of attack is a straight line between your character a cursor - that much is obvious. But how does the game determine the vertical angle of an attack?