How to make AI you can hide from?

So i am making a game where there are AI that attack the player when they see them or just execute the code when they see the player.
But i want the player to be able to hide behind objects so the AI does not see them but i cannot just make it so when the player is hiding the enemy cannot see them because if the AI saw them go behind or can still see them while they are hiding i need them to acknowledge them.
I looked around and could only find posts about pathfinding but nothing about the AI fov.

1 Like

You could try using Rays to see if there are any parts blocking the vision from the AI’s Head to the player’s body.

Developer Hub Links:

1 Like

Oh right thanks i forgot about rays…
Thanks alot!

2 Likes