Hey im currently using this function

to calulate the angles between 2 players, but it doesnt give me the right angles, any ideas of how to calculate aimbot angles correctly?

C++:

```
void CMaths::CalcAngles(const vec3_t &source, const vec3_t &dest, vec3_t &ang)
{
double delta[3] = { (source[0] - dest[0]), (source[1] - dest[1]), (source[2] - dest[2]) };
double hyp = sqrt(delta[0] * delta[0] + delta[1] * delta[1]);
ang[0] = (float)(atan(delta[2] / hyp) * RADPI);
ang[1] = (float)(atan(delta[1] / delta[0]) * RADPI);
ang[2] = 0.0f;
if (delta[0] >= 0.0f)
ang[0] += 180.0f;
}
```

Last edited by a moderator: