AI Perception Sight Returns false and True at the same time

I looked over this which others asked and discussed about but all settings I tried and got to no solution


AI Perception Sight Returns both false and True and I’m getting it from Event tick printing the Bool variable. Exact same setup I have with my other AI and it works perfectly with firing true over Sight and false over No Sight/Losing sight. Any thoughts?

Hey @Benyamin3000! So what I’m seeing here is your AIPerception is getting ALL actors within a certain range that it can see and is pumping out Falses because of the other actors in the scene, while pumping out Trues for the tagged actor.

I would suggest adding a check to see if the percieved actors = a certain class before setting can/can’t see player! :slight_smile:

1 Like

I need to add a potential “Gotcha”.

AI Perception only detects half height of capsule component on Characters. If it’s blocked the AI will not see you. Regardless if waist down/up is visible.

Work around is to modularize the character and add skeletal mesh components.

For example remove the head from the character mesh and add it back as second sk mesh component. Add AI sense to it.

AI perception will now detect the head.

1 Like

Thank you very much :smiley: I solved it by breaking Stimuli and connecting to the variable. Apparently I also had a copy of the AI character somewhere in my world inside a covered box so couldn’t see me. Event tick was firing true for the one I’ve been working on and false for the one in the box who couldn’t see me haha

1 Like

Glad you found your solution @Benyamin3000! I’m going to go ahead and mark this as solved, make sure you come back if you have any other conundrums you would like some help with!