View Single Post
Bimbo1
Senior Member
Join Date: Jan 2010
Location: brazil
Old 04-06-2013 , 11:54   Re: [STOCK] Target is exist in client's angle and distance (03/07/2013 Ver 1.1)
Reply With Quote #4

it's pretty cool! but it doesn't check whether there is an obstacle between the two players or not, does it? well, since cassiopeia's ult doesn't do that too, i guess it's fine.
@edit: oh, since i think that you would be using this several times to detect all the players that are in range of someone, you would like to have it optimized. so, i recommend you using the third parameter of GetVectorDistance set as true, which will return a value without square rooting and, then, square the distance of your function. square rooting isn't as easy as a multiplication. also, checking the distance vector between the two players before doing anything else would be nice too, because it wouldn't do the angle calculation unnecessarily. if resultdistance(squared) is > distance(squared), nothing else matters, return it false right away.
__________________
sie sind das essen und wir sind die jäger!

Last edited by Bimbo1; 04-06-2013 at 17:09.
Bimbo1 is offline