Hi everyone,
I know that my question seems silly. But I’m stucked with that for hours now.
I just want to know how we can use UKismetFunctionLibrary::SphereOverlapActor();
Here is my code :
-
First, i’m initiating my filters array.
m_objectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_WorldDynamic)); m_objectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_PhysicsBody)); m_actorsToIgnore.Add(GetOwner()); m_pWorld = GetWorld();
-
Then I just use the function in tick :
TArray<AActor*> overlappedActors; UKismetSystemLibrary::SphereOverlapActors(m_pWorld, GetComponentLocation(), m_radius, m_objectTypes, nullptr, m_actorsToIgnore, overlappedActors);
But my array of actors is always empty.
I’ve already checked if i was in the good positionn with a radius big enough.
It’s truly the classical problem :“If don"t know it, you can’t use it”
Bests,
Alexandre