Create Extraction Zone
Posted suomeimei
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Create Extraction Zone相关的知识,希望对你有一定的参考价值。
添加C++类,名称为FPSExtractionZone
添加盒体组件,进行公开处理,并设置为随处可见
UPROPERTY(VisibleAnywhere,Category="Components") UBoxComponent* OverlapComp;
在Cpp文件中添加头文件
#include "Components/BoxComponent.h"
对刚才定义的组件进行实例化
OverlapComp = CreateDefaultSubobject<UBoxComponent>(TEXT("OverlapComp"));//创建默认子对象并为它命名 OverlapComp->SetCollisionEnabled(ECollisionEnabled::QueryOnly);//设置碰撞为启动,类型为只发出查询 OverlapComp->SetCollisionResponseToAllChannels(ECR_Ignore);//设置碰撞为响应所有通道,设置为忽略 OverlapComp->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);//设置碰撞为响应指定通道,仅选择人形体进行设置 OverlapComp->SetBoxExtent(FVector(200.0f));//设置响应范围,XYZ轴均为200个单位长度
设置根组件
RootComponent = OverlapComp;
绑定到OnComponentBeginOverlap
verlapComp->OnComponentBeginOverlap.AddDynamic(this, &AFPSExtractionZone::HandleOverlap);
按Alt+G进入内部
再按Alt+G
复制后面的参数
声明函数,并标记为UFUNCTION
UFUNCTION() void HandleOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
输出日志:
UE_LOG(LogTemp, Log, TEXT("Overlap"));
将OverlapComp设置为游戏中的隐藏项
OverlapComp->SetHiddenInGame(false);
以上是关于Create Extraction Zone的主要内容,如果未能解决你的问题,请参考以下文章
mysqlspringboot启动报错Could not create connection to database server. Attempted reconnect 3 times. (代码片
论文阅读:《MuKEA: Multimodal Knowledge Extraction and Accumulation for Knowledge-based Visual Question An
Feature extraction using convolution
ImportError:没有名为 sklearn.feature_extraction.text 的模块
Exploratory data analysis and feature extraction with Python