# How to Set Sight Radius in Blueprint

**URL:** <https://forums.unrealengine.com/t/how-to-set-sight-radius-in-blueprint/491384>\
**Category:** Blueprint\
**Tags:** reference-blueprint, sight, unreal-engine, nodes, question\
**Created:** [November 27, 2021, 5:50pm UTC](https://forums.unrealengine.com/t/how-to-set-sight-radius-in-blueprint/491384 "2021-11-27T17:50:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidTveraas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/davidtveraas/32/1058281_2.png) [@DavidTveraas](https://forums.unrealengine.com/u/DavidTveraas)\
**Post date:** [November 27, 2021, 5:50pm UTC](https://forums.unrealengine.com/t/how-to-set-sight-radius-in-blueprint/491384/1 "2021-11-27T17:50:29Z")

</div>

![353162-senses.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/c/56c13a370e78c18f870bcfd4b6a4f5e9b4cf3121.png)

How do I change a sight radius in Blueprint? I’ve ran a get all actors of controller class BP, I’ve cast to the owner, and other attempts, but I can’t seem to figure out what plugs into the Pawn Sensing Component Object Reference. Could anyone please show me what plugs into this Node?

---

<div class="post-metadata">

**Author:** ![CodingRook](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CodingRook](https://forums.unrealengine.com/u/CodingRook)\
**Post date:** [November 27, 2021, 6:04pm UTC](https://forums.unrealengine.com/t/how-to-set-sight-radius-in-blueprint/491384/2 "2021-11-27T18:04:29Z")

</div>

Ok you mean how to change the radius at runtime? Not the default in your Blueprint’s Details panel?  
I know how to do this in code, but not sure if the right Nodes are exposed by default in BP…

If you’re interested, the code I’ve used is:

```
const FAISenseID SenseIdFilter = UAISense::GetSenseID(UAISense_Sight::StaticClass());
	UAISenseConfig_Sight* SightConfiguration = Cast<UAISenseConfig_Sight>(MyAIController->GetAIPerceptionComponent()->GetSenseConfig(SenseIdFilter));

	if(SightConfiguration)
	{
		SightConfiguration->SightRadius = ....
	}
```

---

<div class="post-metadata">

**Author:** ![DavidTveraas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/davidtveraas/32/1058281_2.png) [@DavidTveraas](https://forums.unrealengine.com/u/DavidTveraas)\
**Post date:** [November 27, 2021, 6:26pm UTC](https://forums.unrealengine.com/t/how-to-set-sight-radius-in-blueprint/491384/3 "2021-11-27T18:26:01Z")

</div>

Thank you. But I’m not sure I understand any of that. I’ve only used Blueprints for this whole project.  
The goal here is to make the player character “invisible” for a short time when they activate an ability. I figured setting sight radius to 0 for a period of time would for that.

---

<div class="post-metadata">

**Author:** ![CodingRook](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CodingRook](https://forums.unrealengine.com/u/CodingRook)\
**Post date:** [November 27, 2021, 6:33pm UTC](https://forums.unrealengine.com/t/how-to-set-sight-radius-in-blueprint/491384/4 "2021-11-27T18:33:33Z")

</div>

Ah ok, in that case no you don’t want to manually be tampering with the sight radius (I checked by the way and it’s defined as BlueprintReadOnly in Epic’s codebase, so you can’t modify it).  
There is a node that you can use linking out of your perception component ‘Forget All’ that forces the AI to forget all perceived actors. That of course may not work so well, because your AI can detect you again next frame. You may need custom logic after that potentially. You could include Branch nodes in your AI perception logic that when you want ‘invisibility’ then you do nothing (maybe you have a bVisible variable in your blueprint).  
Or there is another node SetSenseEnabled, which if you set that to false, then you render your AI senseless (you have to pick the ‘sense’ so if you pick Sight, then you force your AI into blindness).

---

<div class="post-metadata">

**Author:** ![DavidTveraas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/davidtveraas/32/1058281_2.png) [@DavidTveraas](https://forums.unrealengine.com/u/DavidTveraas)\
**Post date:** [November 27, 2021, 7:49pm UTC](https://forums.unrealengine.com/t/how-to-set-sight-radius-in-blueprint/491384/5 "2021-11-27T19:49:27Z")

</div>

Hmmm… I’ll play around with the behavior and see if I can come up with something like what I’m imagining. Thanks!
