Cast to player returns null

i would like to cast the actor to a playercontroller in the actor so as to detect it and trigger a particle system. the problem is that after debugging the player controller seems to be null what seems to be the problem

void ABonFire::LightUpBonFire()
{
	FireParticle->SetVisibility(true);
}

void ABonFire::GetPlayer(AActor * Player)
{
	MyPlayerController = Cast<AunrealFundementalsCharacter>(Player);
}


void ABonFire::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
	if (MyPlayerController != NULL) 
	{
			if (MyPlayerController->bIsInteracting == true && bBonFireIsInRange)
			{
				LightUpBonFire();
			}
	}
	

}

thank you for your help in advanced

You can cast Actor to type APlayerController only if your Actor IS of type APlayerController. When casting fails it returns NULL.
Use UGameplayStatics::GetPlayerController(this->(), 0) to get player controller

You can only cast if classes are related in class tree (look class viewer in Window->Devlopment Tools), other then that you need to use some other function to get controller, most easiest one is GetController()

It return controller that posseses the actor, this is probably what you looking for, if not you can get controller from this function from :

there also one in UEngine (use GEngine):

Fucntion that AlekseyIlin saying is the function from blueprints, you can use it too ;]