public static GetFlashPos ( AIHeroClient target, bool serverPos, int distance = 150 ) : Vector3 | ||
target | AIHeroClient | |
serverPos | bool | |
distance | int | |
return | Vector3 |
public static Vector3 GetFlashPos(AIHeroClient target, bool serverPos, int distance = 150)
{
var enemyPos = serverPos ? target.ServerPosition : target.Position;
var myPos = serverPos ? Variables._Player.ServerPosition : Variables._Player.Position;
return enemyPos + Vector3.Normalize(enemyPos - myPos) * distance;
}