- 添加静态模型组件:UStaticMeshComponent *Mesh;
- 给组件添加事件
UFUNCTION()
void OnBeginTriggerOverlap(class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
Mesh->OnComponentBeginOverlap.AddDynamic(this, &XXXActor::OnBeginTriggerOverlap);
UE4:c++中添加触发器事件
最新推荐文章于 2024-05-15 06:24:16 发布