Hey,

I'm working on my own project at the moment, it's a tower defence game. I want to rotate a tower to face an enemy and I'm having a little trouble figuring it out.

What I need to know is how to get the real x and real y of the enemy. Let's say the tower is at x 200, y 200, and the monster at x 300, y 50, which would put the monster above and to the right of the tower, how exactly do I determine the real value of the monster from those coordinates?

Code:
float realX = ...
float realY = ...

float radians = atanf(realY / realX);
Would appreciate any help, thanks