# Is there some way to disable AI Perception at runtime?

**URL:** <https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125>\
**Category:** AI\
**Tags:** Optimization, Perception, unreal-engine, Blueprint, question\
**Created:** [September 5, 2015, 9:18am UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125 "2015-09-05T09:18:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stormrage256](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/stormrage256/32/1008648_2.png) [@Stormrage256](https://forums.unrealengine.com/u/Stormrage256)\
**Post date:** [September 5, 2015, 9:18am UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/1 "2015-09-05T09:18:25Z")

</div>

Hi, I just recently made the switch from Pawn Sensing to AI Perception for my enemy AI. In Pawn sensing, there was a way to disable the sensing at runtime, but I’m unable to do the same with AI Perception. I’ve tried disabling it with ‘Set Component Tick Enabled’, but it still registering stimulus using it’s hearing sense. I’d like to turn it off during certain situations like say, when a bot is stunned or incapacitated temporarily, for performance reasons. Is there some way to turn it off natively using the perception and not rely on external conditions to check the bot state every time?

---

<div class="post-metadata">

**Author:** ![UltimateGoDLikE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UltimateGoDLikE](https://forums.unrealengine.com/u/UltimateGoDLikE)\
**Post date:** [November 13, 2015, 2:37am UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/2 "2015-11-13T02:37:45Z")

</div>

I’m also facing the exact same issue, i think that’s a bug with AIperception that cause it to ignore set component tick enabled even if it is set to false.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ca7a0069](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ca7a0069](https://forums.unrealengine.com/u/anonymous_user_ca7a0069)\
**Post date:** [February 5, 2016, 2:13pm UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/3 "2016-02-05T14:13:21Z")

</div>

Hi, I have the same issue in UE 4.10, SetComponentTickEnabled and Deactivate don’t disable the senses. Is there another way to do this?

---

<div class="post-metadata">

**Author:** ![Black\_Phoenyx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Black\_Phoenyx](https://forums.unrealengine.com/u/Black_Phoenyx)\
**Post date:** [March 22, 2016, 6:04pm UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/4 "2016-03-22T18:04:34Z")

</div>

This may be a little late but it is a work around that you may be able to try…when you want to temporarily disable the sense you can set their ranges to something really low or to zero or completely turn them off by setting the bool values for each. Like this:

![83382-pawnsensing.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/f/eaf4beee94dab4837a2de929f87f51db5c03a31d.png)

---

<div class="post-metadata">

**Author:** ![Mwied](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mwied](https://forums.unrealengine.com/u/Mwied)\
**Post date:** [March 23, 2016, 8:36am UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/5 "2016-03-23T08:36:42Z")

</div>

Hi Black Phoenyx

Thank fo the input, but im not sure this will work with AI Perception.

---

<div class="post-metadata">

**Author:** ![Black\_Phoenyx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Black\_Phoenyx](https://forums.unrealengine.com/u/Black_Phoenyx)\
**Post date:** [March 23, 2016, 12:45pm UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/6 "2016-03-23T12:45:25Z")

</div>

Would you mind posting a screenshot of your setup with Perception Update? Have you tried maybe setting up a simple Bool and branch:

![83493-updateperceptionbool.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/1/6812ca564488a35ddd683b46618368a35725278b.png)

---

<div class="post-metadata">

**Author:** ![Mwied](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mwied](https://forums.unrealengine.com/u/Mwied)\
**Post date:** [March 23, 2016, 1:07pm UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/7 "2016-03-23T13:07:51Z")

</div>

I will be happy to, but im not able to do so for the next few weeks.  
Maybe Stormrage256 can get something up here faster.

---

<div class="post-metadata">

**Author:** ![Ryan\_Darcey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Darcey](https://forums.unrealengine.com/u/Ryan_Darcey)\
**Post date:** [December 18, 2016, 10:13pm UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/8 "2016-12-18T22:13:51Z")

</div>

Unfortunately you can’t access via blueprints…but there is a function in code called “UpdatePerceptionWhitelist” on the Perception Component that’ll get this done.

---

<div class="post-metadata">

**Author:** ![Bitwaker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bitwaker](https://forums.unrealengine.com/u/Bitwaker)\
**Post date:** [May 30, 2019, 2:30pm UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/9 "2019-05-30T14:30:34Z")

</div>

Did you try [SetSenseEnabled Function](https://api.unrealengine.com/INT/API/Runtime/AIModule/Perception/UAIPerceptionComponent/SetSenseEnabled/index.html)?

```
PerceptionComp->SetSenseEnabled(UAISense_Sight::StaticClass(), false);
PerceptionComp->SetSenseEnabled(UAISense_Hearing::StaticClass(), false);

```

It is also [exposed to BP](https://api.unrealengine.com/INT/BlueprintAPI/AI/Perception/SetSenseEnabled/index.html):

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ca7a0069](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ca7a0069](https://forums.unrealengine.com/u/anonymous_user_ca7a0069)\
**Post date:** [June 4, 2019, 8:35am UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/10 "2019-06-04T08:35:00Z")

</div>

SetSenceEnabled would indeed work after UE 4.18 when it was added

---

<div class="post-metadata">

**Author:** ![UNIT28Studios](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unit28studios/32/1142186_2.png) [@UNIT28Studios](https://forums.unrealengine.com/u/UNIT28Studios)\
**Post date:** [October 11, 2024, 11:28am UTC](https://forums.unrealengine.com/t/is-there-some-way-to-disable-ai-perception-at-runtime/331125/11 "2024-10-11T11:28:19Z")

</div>

Thank you for this! This was much harder to find than it should have been
