#include <FrictionTrigger.h>
Public Member Functions | |
AFrictionTrigger (const FObjectInitializer &ObjectInitializer) | |
void | OnTriggerBeginOverlap (UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult) |
void | OnTriggerEndOverlap (UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex) |
void | SetBoxExtent (const FVector &Extent) |
void | SetEpisode (const UCarlaEpisode &InEpisode) |
void | SetFriction (float NewFriction) |
Public Attributes | |
const UCarlaEpisode * | Episode = nullptr |
float | Friction = 0.0f |
UBoxComponent * | TriggerVolume |
Protected Member Functions | |
virtual void | BeginPlay () override |
virtual void | EndPlay (EEndPlayReason::Type EndPlayReason) override |
virtual void | Tick (float DeltaTime) override |
Protected Attributes | |
TArray< float > | OldFrictionValues |
Private Member Functions | |
void | Init () |
void | UpdateWheelsFriction (AActor *OtherActor, TArray< float > &NewFriction) |
Definition at line 14 of file FrictionTrigger.h.
AFrictionTrigger::AFrictionTrigger | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 9 of file FrictionTrigger.cpp.
References TriggerVolume.
|
overrideprotectedvirtual |
Definition at line 81 of file FrictionTrigger.cpp.
References Init().
|
overrideprotectedvirtual |
Definition at line 87 of file FrictionTrigger.cpp.
References OnTriggerBeginOverlap(), OnTriggerEndOverlap(), and TriggerVolume.
|
private |
Definition at line 23 of file FrictionTrigger.cpp.
References OnTriggerBeginOverlap(), OnTriggerEndOverlap(), and TriggerVolume.
Referenced by BeginPlay().
void AFrictionTrigger::OnTriggerBeginOverlap | ( | UPrimitiveComponent * | OverlappedComp, |
AActor * | OtherActor, | ||
UPrimitiveComponent * | OtherComp, | ||
int32 | OtherBodyIndex, | ||
bool | bFromSweep, | ||
const FHitResult & | SweepResult | ||
) |
Definition at line 45 of file FrictionTrigger.cpp.
References Friction, ACarlaWheeledVehicle::GetWheelsFrictionScale(), OldFrictionValues, UpdateWheelsFriction(), and Vehicle.
Referenced by EndPlay(), and Init().
void AFrictionTrigger::OnTriggerEndOverlap | ( | UPrimitiveComponent * | OverlappedComp, |
AActor * | OtherActor, | ||
UPrimitiveComponent * | OtherComp, | ||
int32 | OtherBodyIndex | ||
) |
Definition at line 64 of file FrictionTrigger.cpp.
References ACarlaWheeledVehicle::GetWheelsFrictionScale(), OldFrictionValues, UpdateWheelsFriction(), and Vehicle.
Referenced by EndPlay(), and Init().
|
inline |
Definition at line 49 of file FrictionTrigger.h.
References TriggerVolume.
|
inline |
Definition at line 44 of file FrictionTrigger.h.
|
inline |
Definition at line 54 of file FrictionTrigger.h.
|
overrideprotectedvirtual |
Definition at line 104 of file FrictionTrigger.cpp.
|
private |
Definition at line 38 of file FrictionTrigger.cpp.
References ACarlaWheeledVehicle::SetWheelsFrictionScale(), and Vehicle.
Referenced by OnTriggerBeginOverlap(), and OnTriggerEndOverlap().
const UCarlaEpisode* AFrictionTrigger::Episode = nullptr |
Definition at line 78 of file FrictionTrigger.h.
float AFrictionTrigger::Friction = 0.0f |
Definition at line 73 of file FrictionTrigger.h.
Referenced by ACarlaWheeledVehicle::BeginPlay(), and OnTriggerBeginOverlap().
|
protected |
Definition at line 68 of file FrictionTrigger.h.
Referenced by OnTriggerBeginOverlap(), and OnTriggerEndOverlap().
UBoxComponent* AFrictionTrigger::TriggerVolume |
Definition at line 76 of file FrictionTrigger.h.
Referenced by AFrictionTrigger(), EndPlay(), and Init().