8#include "GameFramework/PlayerController.h"
17 auto Player = GetOwningPlayerController();
18 if (Player ==
nullptr)
21 UE_LOG(LogCarla, Error, TEXT(
"Can't find player controller!"));
37 double Now = FPlatformTime::Seconds();
48 if (Player->ProjectWorldLocationToScreen(
StringList[i].Location, Screen,
true))
74 if (Player->ProjectWorldLocationToScreen(
LineList[i].Begin, Begin,
true) &&
75 Player->ProjectWorldLocationToScreen(
LineList[i].End, End,
true))
79 DrawLine(Begin.X, Begin.Y, End.X, End.Y,
LineList[i].Color,
LineList[i].Thickness);
99 double Now = FPlatformTime::Seconds();
102 HUDString Obj { Str, Location, Color, Now + LifeTime };
108void ACarlaHUD::AddHUDLine(
const FVector Begin,
const FVector End,
const float Thickness,
const FColor Color,
double LifeTime)
111 double Now = FPlatformTime::Seconds();
114 HUDLine Obj { Begin, End, Thickness, Color, Now + LifeTime };
UE_LOG(LogCarla, Log, TEXT("UActorDispatcher::Destroying actor: '%s' %x"), *Id, Actor)
TArray< HUDLine > LineList
UWheeledVehicleMovementComponent * DebugVehicle
virtual void DrawHUD() override
TArray< HUDString > StringList
void AddHUDString(const FString Str, const FVector Location, const FColor Color, double LifeTime)
void AddHUDLine(const FVector Begin, const FVector End, const float Thickness, const FColor Color, double LifeTime)