Code: Select all
F5::
xx1 = 1
yy1 = 2.5
xx2 = 3
yy2 = 3
Angle1(xx1, yy1, xx2, yy2) {
return ACos((xx1 * xx2 + yy1 *yy2) / (Sqrt(xx1**2 + yy1**2) * Sqrt(xx2**2 + yy2**2))) * 57.2957795
}
MsgBox, % Angle1(xx1,yy1,xx2,yy2)
return
f6::
x1=26.77
y1=77.00
x2=26.71
y2=75.96
MsgBox, % Angle(x1,y1,x2,y2)
Angle(x1, y1, x2, y2) {
return ACos((x1 * x2 + y1 * y2) / (Sqrt(x1**2 + y1**2) * Sqrt(x2**2 + y2**2))) * 57.2957795
}
return
F10::
reload
x1,y1 is my current pos and x2,y2 destination pos. i test in-game navigation and when i turn my character to 0 degree and start moving only y pos is changed, so navigation inside game is correct.