Is there a way to make AI unable to see through smoke/fog?

I’m working on an AI perception system and its working for the most part. The AI perceives other actors that go into it’s view radius using the Sight Viewing configuration. Basically I’m wondering if there is a way to make the AI unable to visually perceive other actors if they are behind smoke/fog particle effects? For reference of what I’m trying to do, think Call of Duty after someone throws a smoke grenade.

Also I’m doing all of this in C++, so any help on that front would be appreciated.

Yep.

  1. Make the Actor spawning the particle
    effect have a collider.
  2. Set the collider “inactive”
    initially and only activate it when
    the particle effect is started.
  3. Set the Collision preset to “Custom”
  4. Check “Block Visibility” in the
    “Collision Responses”
  5. Don’t forget to check “Generate
    Overlap Events”

This should* work with the AI perception component.

Here is a short blog post for further details on collision and the official documentation.

1 Like

Awesome thank you!

Did you manage to make it work?

I haven’t had the time yet, but that makes a lot of sense to me. I will mark this question resolved when I do.

Yeah this method totally works thanks!