Hello! I have a monster ai for a game thats inspired by/a fangame for Dandy’s World. I want to create a monster ai similar to the one they have in game! Most of it is done, but I’m not sure how to recreate the hiding system.
There might be better ways but I believe you can just raycast. If you ray cast from the monster’s head to the player’s head and the ray doesn’t hit the player then they’re hiding. I would factor in distance and the dot product of the player and monster to make this better too