Example 1. Find the range of $y=3 \sin x+4 \cos x-2$.

Translate the above text into English, keeping the original text's line breaks and format, and output the translation result directly. 

Example 1. Find the range of $y=3 \sin x+4 \cos x-2$.
$3 \sin x+4 \cos x-2-y=0$, since $\sin ^{2} x+\cos ^{2} x=$ 1, it is known that the line $3 v+4 u-2-y=0$ intersects the circle $u^{2}+v^{2}=1$ at a common point $(\sin x, \cos x)$, the distance from the center of the circle $(0,0)$ to the line $\frac{|-2-y|}{\sqrt{3^{2}+4^{2}}}$ $\leqslant 1, \therefore-1 \leqslant y \leqslant 3$.