This one sounds easy to do, but I’m having a weird problem. I believe that the code below should already work, but when I run it, it crashes the UPBGE. Basically, I want this function to return a list of vectors that are within radius of another vector, which is within the list as well, but I think I might have done something wrong. Thanks any help.
def _radius_system_(self, list, leng): result_list =  for val in list: vec_ = Vector(val[x] for x in range(3)) # vetor atual para comparação dentro da lista result_list = [x for x in list if (Vector(x[y] for y in range(3)) - vec_).length < leng] return result_list