Perception is inconsistent?
I have a problem where my perception component does not seem to be updating correctly. With the debug tools on, I can see that it does notice my AI, but for some reason it's not updating my blueprint correctly.
The perception component creates a sphere around the polar bear (and on the screenshot it shows white lettered "Sight" next to the polar bear) as it enters the vision cone of the penguin.(blue circle) So it is getting registered. However the "Is enemy visible" boolean variable returns as false.(orange circle)
Here's the blueprint I'm trying to use to set the blackboard variable of "is enemy visible". I always seem to get "no debug data" when I try to watch the values after breaking. Is that a problem? I'm using a "On Perception Updated" node to start everything. I'm wondering if perhaps it's not updating often enough?
Does perception get updated simply by an object moving around in the perception cone? or only if something enters/exits the cone? If it's the latter, how can I force an update more often?
The "closest enemy" (blue circle) variable is returning the polar bear shown in the above screenshot (it shows red transparent letters "is closest") so I'm not sure why it's not updating correctly.
What I want is the "is enemy visible" (orange circle) variable to return as true as long as the perception component does see the enemy. But I guess I'm missing something.
Perhaps there are better ways to check for visibility?
Follow this question
Once you sign in you will be able to subscribe for any updates here