19 FVector StartLocation, FVector EndLocation, UWorld *
World)
21 TArray<FHitResult> OutHits;
22 World->LineTraceMultiByChannel(
26 ECC_GameTraceChannel3,
27 FCollisionQueryParams(),
28 FCollisionResponseParams()
30 std::vector<crp::LabelledPoint> result;
31 for (
auto& Hit : OutHits)
37 FVector UELocation = Hit.Location;
50 FVector StartLocation, FVector Direction,
float MaxDistance, UWorld *
World)
53 bool bDidHit =
World->LineTraceSingleByChannel(
56 StartLocation + Direction.GetSafeNormal() * MaxDistance,
57 ECC_GameTraceChannel2,
58 FCollisionQueryParams(),
59 FCollisionResponseParams()
67 FVector UELocation = Hit.Location;
76 return std::make_pair(bDidHit,
crp::LabelledPoint(FVector(0.0f,0.0f,0.0f), crp::CityObjectLabel::None));
TSharedPtr< const FActorInfo > carla::rpc::ActorState UWorld * World
ALargeMapManager * GetLMManager() const
FVector LocalToGlobalLocation(const FVector &InLocation) const
static crp::CityObjectLabel GetTagOfTaggedComponent(const UPrimitiveComponent &Component)
检索已标记组件的标记。
static ACarlaGameModeBase * GetGameMode(const UObject *WorldContextObject)
static std::pair< bool, carla::rpc::LabelledPoint > ProjectPoint(FVector StartLocation, FVector Direction, float MaxDistance, UWorld *World)
static std::vector< carla::rpc::LabelledPoint > CastRay(FVector StartLocation, FVector EndLocation, UWorld *World)