Original Post
Im using the formula to calculate angles of a point
r = sqrt(x^2 + z^2)
arcsin(z/r)
arccos(x/r)
Question::How would u calculate the angle if u moved the origins position? U would be calculating the angle of a point based on another point. Imagine this...(my game) enemys are chasing u on foot. To make them face the correct direction there running, u have to rotate them with the correct angle facing the players location. I had to do alot of other added math to make that formula work in the game but it only worked at the origin(0,0,0).
Some help would be great! thanx