# How to Un-see player PawnSensingComponent

**URL:** <https://forums.unrealengine.com/t/how-to-un-see-player-pawnsensingcomponent/432919>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [September 1, 2018, 2:17am UTC](https://forums.unrealengine.com/t/how-to-un-see-player-pawnsensingcomponent/432919 "2018-09-01T02:17:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CHADALAK1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CHADALAK1](https://forums.unrealengine.com/u/CHADALAK1)\
**Post date:** [September 1, 2018, 2:17am UTC](https://forums.unrealengine.com/t/how-to-un-see-player-pawnsensingcomponent/432919/1 "2018-09-01T02:17:31Z")

</div>

Hello Community!

I’m trying to have my PawnSensingComponent be able to ‘UnSee’ a player. However, I’m not quite sure if that is in the functionality of the PawnSensingComponent. Is there any work around to get this to work? Or should I just use a line trace and distance/dot product check instead?

```
void ATurret::OnSeePlayer(APawn *Pawn)
{
	ABaseCharacter *Char = Cast<ABaseCharacter>(Pawn);
	if (Char)
	{
		if (TurretState != ETurretState::E_Attack)
		{
			InitializeAttackState();
			SetTarget(Char);
		}
	}
}
```

---

<div class="post-metadata">

**Author:** ![CHADALAK1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CHADALAK1](https://forums.unrealengine.com/u/CHADALAK1)\
**Post date:** [September 9, 2018, 7:06pm UTC](https://forums.unrealengine.com/t/how-to-un-see-player-pawnsensingcomponent/432919/2 "2018-09-09T19:06:31Z")

</div>

I decided to switch to AIPreception instead. Considering seeing a majority of the post saying PawnSeeingComponent is obsolete, might as well use the newest
