Actor->AttachToComponent(this, FAttachmentTransformRules::KeepWorldTransform);

UE5 didn’t want to convert my “this” (UTriggerComponent) to it’s USceneComponent, so I had to just do this->GetAttachParent() which returned the USceneComponent.

So I don’t believe there is a UTriggerComponent in unreal…instead, in C++, you’ll use UBoxComponent, USphereComponent, or UCapsuleComponent.

UTriggerComponent was a custom C++ class that extended UBoxComponent from the course.

Privacy & Terms