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);
}
}
}