How can I make enemy detection in a certain area while looking through ally/neutral entities?

That’s sweet, thanks.

I tried to follow your advice, and so I created an empty project, and implemented things I needed, and they did work. Then I moved them to my project, and they did work as well. After that I started trying to make my original classes to look like the new ones, and the enemy class (the controller) did work as supposed, however the tower controller was the actual issue.

The thing is that I thought that a tower may vary some sight parameters, such as vision range, so I added some methods to modify the config, and that’s was the issue. If I remove everything that varies the config code at runtime (i.e. after all the initialization), everything works perfectly – the green circle does follow the enemy, and the CanBeSeenFrom function gets called on every update call.

Now the question is: How can I reconfigure the sense on runtime without breaking it?

After looking for some answers I found that I have to call UAIPerceptionSystem::UpdateListener() with the sense I want to configure, or just call RequestStimuliListenerUpdate() on it instead. However, for some reason the problem doesn’t get resolved, so apparently I have to step through the engine function calls, and see what’s wrong with the sight sense update.

I’m still downloading the editor symbols, so once I got them, and went through the function calls, I’ll tell what I’ve found eventually.

Thanks for the explained answer once again.