Problem With Radar

Hello im having a problem with my radar,

well, theres an Enemy and the Player:

ENEMY has an empty with a radar sensor(Radar Looks for Property Player), and when the radar hits the Player The enemy attacks it ,

The problem here its, that when the Player rotates Left Or Right ,

SOMETIMES, The radar Dosnt Work :S

Guys i found it out after making a blend file and alot of testing ;D , for thouse who have this same proble, the problem was, that my player and enemy where on convex hull , it looks like that made it work incorrectly :wink:

that discussion is old but i have same problem and how to fix it you can tell me ?

the problem was, that my player and enemy where on convex hull

so use something else then convex hull collision bounds, like box or capsule.

#this is what I use 
for e_actor in enemyList:
    for f_actor in friendlyList:
        local = e_actor.worldOrientation.inverted() * ( f_actor.worldPosition - e_actor.worldPosition)
        if local.magnitude< e_actor['Range']:
            if local.x>0:
                if abs(local.y) - local.x <0 and abs(local.z) - local.x <0:
                     #Friendly is in enemy radar area

Radar sensor is vs every item in that collision layer

my enemy collision bound is box and my player collision bound is cylinder my enemy stops sometimes when im not watching him. and continues when I look my enemy.

i think its a optimization problem. radars/rays/nears does not work when
camera could see.

That is possible, something stops when not rendered or to far offscreen indeed.
what is it you exactly try to do?

Or maybe try @BluePrintRandom solution, python in this case would work better.

simple_ai.blend (532.9 KB)

i fixed it i just uncheck Occlusion Culling.