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