ANGLE.pan = atan(VECTOR.x/VECTOR.y);
ANGLE.tilt = asin(VECTOR.z/length(VECTOR));

Shouldn't it be:
ANGLE.pan = atan(VECTOR.y/VECTOR.x); ? (Opposite/Adjacent)


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com