I have been wanting to make an NPC for a while now but I don’t want to just put a part around the NPC and make that the detection box I want it to have a view.
Something like Creating a field of sight but with obstruction? or do you actually want it to visually look like the images you provided or do you want both
i’m not sure i completely understand what you are trying to do, but you might want to check out the raycasting algorithm in: 2d Visibility and it can be “easily” expanded to 3d
You could try using a part attached to the npc and if it touches a player, raycast to see if they are on the other side of a wall. Or, use magnitude to detect when a player is within a certain distance, find out if they are within a certain angle of the npc, and then raycast. That’s if you don’t want to rely on .Touched.