Quote:
stock Float:math_GetAngle(Float: x1, Float:y1, Float: x2, Float:y2){
new angle
floatatan2(y2 - y1, x2 - x1, angle)
return float(angle)
}
|
Quote:
stock Float:math_GetDistance (Float:x0, Float:y0, Float:x1, Float:y1){
return sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0))
}
|
Quote:
stock Float:math_PolarX12 (Float:x,Float:angle,Float:distance){
return (x+floatcos(angle)*distance)
}
|
Quote:
stock Float:math_PolarY12 (Float:y,Float:angle,Float:distance){
return (y+floatsin(angle)*distance)
}
|
are these functions correct?
I want to get 4 positions like this:
Quote:
X-X
-O-
X-X
-P-
X:the position which i need to get
O:where the player aims
P:player
|
Xs depend on where the player aims: