Skip to content

Instantly share code, notes, and snippets.

@JoshLmao
JoshLmao / UE4_SphereOverlapActors_Example
Created April 17, 2020 09:22
Little guide on how to use UE4's UKismetSystemLibrary::SphereOverlapActors
#include "Kismet\KismetSystemLibrary.h"
// Set what actors to seek out from it's collision channel
TArray<TEnumAsByte<EObjectTypeQuery>> traceObjectTypes;
traceObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_Pawn));
// Ignore any specific actors
TArray<AActor*> ignoreActors;
// Ignore self or remove this line to not ignore any
ignoreActors.Init(this, 1);