sir Gulos said:what does get_angle_between_positions do? I originally though that it gives you the angle between the 2 using the origin point as vertex... But that seems to not be true... so how does it measure the angle? as you need at least 3 points to form an angle...
This is my understanding from toying with the command for a goodly amount of time, while trying ot use it in my skirmish code...though I'd happily be corrected as I don't want to be spreading false information.
I believe the angle is measured as follows:
I'm not sure if the rotations of the positions are taken into account or if they are automatically normalized relative to the X-Y/the origin as they are in the diagram.
At the very least I am more certain of its functionality: when having an agent in pos1 and the nearest enemy agent at pos2, then calling get_angle_between_positions, pos1, pos2 and taking the returned value and adding 180 degrees to it, you'll have the first agent moving in the opposite direction from the nearest enemy agent.