10 : Super(ObjectInitializer)
12 RootComponent = ObjectInitializer.CreateDefaultSubobject<USceneComponent>(
this, TEXT(
"SceneRootComponent"));
13 RootComponent->SetMobility(EComponentMobility::Static);
15 TriggerVolume = CreateDefaultSubobject<UBoxComponent>(TEXT(
"TriggerVolume"));
41 if (Vehicle !=
nullptr)
56 if(Vehicle ==
nullptr)
74 if(Vehicle ==
nullptr)
100 Super::EndPlay(EndPlayReason);
106 Super::Tick(DeltaTime);
AFrictionTrigger(const FObjectInitializer &ObjectInitializer)
virtual void EndPlay(EEndPlayReason::Type EndPlayReason) override
void UpdateWheelsFriction(AActor *OtherActor, TArray< float > &NewFriction)
void OnTriggerBeginOverlap(UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult)
TArray< float > OldFrictionValues
TArray< float > GetWheelsFrictionScale()
virtual void BeginPlay() override
void OnTriggerEndOverlap(UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex)
virtual void Tick(float DeltaTime) override
Base class for CARLA wheeled vehicles.
void SetWheelsFrictionScale(TArray< float > &WheelsFrictionScale)
UBoxComponent * TriggerVolume