Hey everyone. Got a question regarding the UKismetSystemLibrary::SphereOverlapActors function.
So i’m trying to set the class filter argument, but i’ve tried passing in a few different things including the name of the class itself (which is ASTrackerBot) and I keep getting an error that the type being passed in can’t be converted into the UClass* that SphereOverlapActors is looking for.
TArray<TEnumAsByte<EObjectTypeQuery>> ObjectTypes;
TArray<AActor*> OutActors;
TArray<AActor*> ActorsToIgnore;
ASTrackerBot* ClassFilter;
if (UKismetSystemLibrary::SphereOverlapActors(GetWorld(), AllyOverlapSphere->GetComponentLocation(), AllyOverlapSphere->GetScaledSphereRadius(), ObjectTypes, ClassFilter, ActorsToIgnore, OutActors))
{
PowerLevel = OutActors.Num();
}