AIPerception - Visibility

n0rtygames
Mon, 28 Aug 2017 08:47:43 +0000
AI

Hi all,

Been having a reasonable amount of success using AIPerception and most of the high level stuff is being done in Blueprints. Currently, I’m working on changing a value on the player to indicate whether they’re in a light or dark area. Simple float (0.0f-1.0f to indicate light level)

What is the best/recommended way to go about using this with the AI Perception? Right now, I have the problem that while I can certainly do a check to see if the player/enemy is detected by the sense - I can then check if the player is lit enough to be seen. However, once the player becomes detected - that has already triggered the OnPerceptionUpdated for that sense. Unless the agent moves out of sight range, I will not lose that detection - so cannot issue another Player Detected message.

I feel like I could iterate over this and then do another layer of checks using this:-

docs.unrealengine.com

Get Perceived Actors

Get Perceived Actors

But I am wondering if there is a cleaner way to simply put a condition on the initial detection of the sight sense.

Thanks,

Steve

3 posts - 1 participant