Thanks,
but what is temp? is temp a zero vector? In order to check the distance between my turret and the entity, should I be using vec_dist? I used vec_dist, but it does not seems to work.