   Getting x,y angles from vector
  Hi anybody! I want implement an AI bot for FPS. First I collided with "how to turn bot's eye at enemy's position".  How to do it if input variable is 3D vector that contains a direction to relative enemy's position and output is angles (x,y)? Thanks for ANY help!   
  [font=arial, verdana, tahoma, sans-serif][size=2]First, you probably don't need to use angles, and your code would be simpler, faster and less likely to be buggy if you didn't use them.[/font][font=arial, verdana, tahoma, sans-serif][size=2][/font][font=arial, verdana, tahoma, sans-serif][size=2]If you do use angles, you need to know that angles are tricky things in 3D. What exactly do you mean by "angles (x,y)"? The only angles I know are the angle between two vectors (the arccos of their dot product) and the angle that specifies how much to rotate around an axis. Try to be as precise as possible so we can map the angles you want to one of these concepts.[/font][font=arial, verdana, tahoma, sans-serif][size=2][/font][font=arial, verdana, tahoma, sans-serif][size=2][/font]   ;  As a note, I'm pretty close to moving this topic to Math/Physics since it really isn't about AI. You might get more help there. I figured I would give our regulars a a chance to weigh in. If you haven't gotten an answer by later today, I'll move it.   ;  No, thanks guys. I have found out way to do that (by atan2(...)). Now I go on setting up AI instructions. Thanks for attention!   ;  Every time I read a question like this, I get a pained expression, and the urge to replace high school geometry and trig with a class you might call "Intro to Inner Product Spaces."   