Ah you are right, this could still look throught walls. What if you do a line trace from the NPC to the found object by camera to make sure there is nothing in between? So for example you have an NPC and your Player. You let the NPC find the player with this Sphere Cone Trace. Now, after you found him, you get his position, and trace from the NPC to the Player with a single line trace (shouldnt be a high performance cost) and check if there is a wall in between.
That sounds good in my head xD