How can i set so that my AI cannot see through my own Object Types?

Hi, i have been working a bit on a wardrobe that the player can open. And for that wardrobe i have created two new object channels for the game, one for the door and one for the mesh surrounding the door. I have this so that i can set that the door and the surrounding mesh will not collide with each other.

But i have run into the problem that the AI’s sight passes through the meshes with my new object types and is able to see the player pawn. I did some more testing and noticed that the AI can see through all objects that are not WorldStatic object types. I’m using the AI perception component to handle sight for my AI.

Is there some way to add more object types that the AI cannot see through or will i have to figure out another way to make my wardrobes? As i don’t want the AI to be able to see through the wardrobe.


Two images of the wardrobe collision settings. The AI can see through these, if object type is changed to WorldStatic, the AI cannot see through them.

For the surrounding mesh. http://i.imgur.com/augLbHY.png

For the wardrobe door. http://i.imgur.com/hX1Jivc.png

Hi Solicio,
as far as I know there is no way the perception system can recognize if an object is in front of the AI. You need to test it on your own. The easiest way to do this is to make a LineTraceByChannel. It’s really straight forward to use it.
Hope I could help you :wink:

Conan

I suppose i could do a line trace to check visibility, but i felt that it was kind of pointless to have the AI perception component handle sight if i had to do even more line traces for each sight to check something basic like visibility.