这里用样条线作为例子 USplineComponent* SplineComponent = NewObject(this, FName(TEXT("SplineC") + FString::FromInt(index++))); SplineComponent->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform); // 设置碰撞 //SplineComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics); //SplineComponent->SetCollisionObjectType(ECC_WorldDynamic); //SplineComponent->SetCollisionResponseToChannel(ECC_GameTraceChannel1, ECollisionResponse::ECR_Overlap); SplineComponent->RegisterComponentWithWorld(GetWorld()); // 清除样条线的点 SplineComponent->ClearSplinePoints();
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)