How to prevent an AI to see the player through objects?

Well, my question is simple enough :slight_smile: i have in my porject an AI that will move to the player location when it sees it, and start shoting. If the player goes away, the AI will follow him. Classic basic ai behaviour. Well, the problem is, if i cross through a door, the AI will still try to chase me and shoot me, even if theorically it CANT see me anymore because im behind the door… so, how to avoid this?? is there a simple way? or do i need to make more work on the behaviour tree to do this?

thanks in advance.