|
Author
|
Message
|
|
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
|

06-11-2006
, 12:27
|
#1
|
atm i only know one way:
you have an triangle here.
A = Attacker
B = AIM
C = VICTIM
a = distance(aim, victim)
b = distance(attacker, victim)
c = distance(attacker, aim )
hc = distance from line to victim
so something like this could work:
s = (a+b+c)/2
area = sqrt(s *(s-a)*(s-b)*(s-c))
area = c * hc /2
hc = 2 * area / c
maybe this is not the best way, but it is a way ;)
|
|
|
|