Base class for CARLA wheeled vehicles. More...
#include <CarlaWheeledVehicle.h>
Public Member Functions | |
Constructor and destructor | |
ACarlaWheeledVehicle (const FObjectInitializer &ObjectInitializer) | |
~ACarlaWheeledVehicle () | |
Get functions | |
const FVehicleControl & | GetVehicleControl () const |
Vehicle control currently applied to this vehicle. More... | |
const FVehicleAckermannControl & | GetVehicleAckermannControl () const |
Vehicle Ackermann control currently applied to this vehicle. More... | |
FTransform | GetVehicleTransform () const |
Transform of the vehicle. More... | |
float | GetVehicleForwardSpeed () const |
Forward speed in cm/s. Might be negative if goes backwards. More... | |
FVector | GetVehicleOrientation () const |
Orientation vector of the vehicle, pointing forward. More... | |
int32 | GetVehicleCurrentGear () const |
Active gear of the vehicle. More... | |
FTransform | GetVehicleBoundingBoxTransform () const |
Transform of the vehicle's bounding box relative to the vehicle. More... | |
FVector | GetVehicleBoundingBoxExtent () const |
Extent of the vehicle's bounding box. More... | |
UBoxComponent * | GetVehicleBoundingBox () const |
Get vehicle's bounding box component. More... | |
float | GetMaximumSteerAngle () const |
Get the maximum angle at which the front wheel can steer. More... | |
AI debug state | |
void | SetAIVehicleState (ECarlaWheeledVehicleState InState) |
ECarlaWheeledVehicleState | GetAIVehicleState () const |
FVehiclePhysicsControl | GetVehiclePhysicsControl () const |
FAckermannControllerSettings | GetAckermannControllerSettings () const |
void | RestoreVehiclePhysicsControl () |
FVehicleLightState | GetVehicleLightState () const |
void | ApplyVehiclePhysicsControl (const FVehiclePhysicsControl &PhysicsControl) |
void | ApplyAckermannControllerSettings (const FAckermannControllerSettings &AckermannControllerSettings) |
void | SetSimulatePhysics (bool enabled) |
void | SetWheelCollision (UWheeledVehicleMovementComponent4W *Vehicle4W, const FVehiclePhysicsControl &PhysicsControl) |
void | SetWheelCollisionNW (UWheeledVehicleMovementComponentNW *VehicleNW, const FVehiclePhysicsControl &PhysicsControl) |
void | SetVehicleLightState (const FVehicleLightState &LightState) |
void | SetFailureState (const carla::rpc::VehicleFailureState &FailureState) |
bool | IsTwoWheeledVehicle () |
virtual bool | IsTwoWheeledVehicle_Implementation () |
Vehicle input control | |
void | ApplyVehicleControl (const FVehicleControl &Control, EVehicleInputPriority Priority) |
void | ApplyVehicleAckermannControl (const FVehicleAckermannControl &AckermannControl, EVehicleInputPriority Priority) |
bool | IsAckermannControlActive () const |
void | ActivateVelocityControl (const FVector &Velocity) |
void | DeactivateVelocityControl () |
void | ShowDebugTelemetry (bool Enabled) |
void | FlushVehicleControl () |
DEPRECATED Set functions | |
void | SetThrottleInput (float Value) |
void | SetSteeringInput (float Value) |
void | SetBrakeInput (float Value) |
void | SetReverse (bool Value) |
void | ToggleReverse () |
void | SetHandbrakeInput (bool Value) |
void | HoldHandbrake () |
void | ReleaseHandbrake () |
TArray< float > | GetWheelsFrictionScale () |
void | SetWheelsFrictionScale (TArray< float > &WheelsFrictionScale) |
void | SetCarlaMovementComponent (UBaseCarlaMovementComponent *MoementComponent) |
template<typename T = UBaseCarlaMovementComponent> | |
T * | GetCarlaMovementComponent () const |
Overriden from AActor | |
TArray< FName > | ConstraintComponentNames |
float | DoorOpenStrength = 100.0f |
ECarlaWheeledVehicleState | State = ECarlaWheeledVehicleState::UNKNOWN |
Current state of the vehicle controller (for debugging purposes). More... | |
UBoxComponent * | VehicleBounds |
UVehicleVelocityControl * | VelocityControl |
struct { | |
FVehicleControl Control | |
FVehicleLightState LightState | |
EVehicleInputPriority Priority = EVehicleInputPriority::INVALID | |
} | InputControl |
FVehicleControl | LastAppliedControl |
FVehicleAckermannControl | LastAppliedAckermannControl |
FVehiclePhysicsControl | LastPhysicsControl |
bool | bAckermannControlActive = false |
FAckermannController | AckermannController |
float | RolloverBehaviorForce = 0.35 |
int | RolloverBehaviorTracker = 0 |
float | RolloverFlagTime = 5.0f |
carla::rpc::VehicleFailureState | FailureState = carla::rpc::VehicleFailureState::None |
bool | bPhysicsEnabled = true |
UBaseCarlaMovementComponent * | BaseMovementComponent = nullptr |
TArray< UPhysicsConstraintComponent * > | ConstraintsComponents |
TMap< UPhysicsConstraintComponent *, UPrimitiveComponent * > | ConstraintDoor |
TMap< UPrimitiveComponent *, FTransform > | DoorComponentsTransform |
TMap< UPrimitiveComponent *, UPhysicsConstraintComponent * > | CollisionDisableConstraints |
FTimerHandle | TimerHandler |
float | DetectionSize {200.0f} |
FBox | FoliageBoundingBox |
float | CarSimOriginOffset = 150.f |
bool | bIsNWVehicle = false |
TArray< int32 > | GetFoliageInstancesCloseToVehicle (const UInstancedStaticMeshComponent *Component) const |
void | DrawFoliageBoundingBox () const |
bool | IsInVehicleRange (const FVector &Location) const |
void | SetWheelSteerDirection (EVehicleWheelLocation WheelLocation, float AngleInDeg) |
Set the rotation of the car wheels indicated by the user 0 = FL_VehicleWheel, 1 = FR_VehicleWheel, 2 = BL_VehicleWheel, 3 = BR_VehicleWheel NOTE : This is purely aesthetic. More... | |
float | GetWheelSteerAngle (EVehicleWheelLocation WheelLocation) |
void | OpenDoor (const EVehicleDoor DoorIdx) |
void | CloseDoor (const EVehicleDoor DoorIdx) |
void | OpenDoorPhys (const EVehicleDoor DoorIdx) |
void | CloseDoorPhys (const EVehicleDoor DoorIdx) |
virtual FVector | GetVelocity () const override |
void | SetRolloverFlag () |
carla::rpc::VehicleFailureState | GetFailureState () const |
virtual void | BeginPlay () override |
virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) |
void | RefreshLightState (const FVehicleLightState &VehicleLightState) |
void | AdjustVehicleBounds () |
void | ResetConstraints () |
void | ApplyRolloverBehavior () |
Rollovers tend to have too much angular velocity, resulting in the vehicle doing a full 360º flip. More... | |
void | CheckRollover (const float roll, const std::pair< float, float > threshold_roll) |
Base class for CARLA wheeled vehicles.
Definition at line 70 of file CarlaWheeledVehicle.h.
ACarlaWheeledVehicle::ACarlaWheeledVehicle | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 34 of file CarlaWheeledVehicle.cpp.
References BaseMovementComponent, VehicleBounds, and VelocityControl.
ACarlaWheeledVehicle::~ACarlaWheeledVehicle | ( | ) |
Definition at line 49 of file CarlaWheeledVehicle.cpp.
void ACarlaWheeledVehicle::ActivateVelocityControl | ( | const FVector & | Velocity | ) |
Definition at line 765 of file CarlaWheeledVehicle.cpp.
References VelocityControl.
|
protected |
Definition at line 227 of file CarlaWheeledVehicle.cpp.
References BoundingBox, FBoundingBox::Extent, UBoundingBoxCalculator::GetVehicleBoundingBox(), FBoundingBox::Origin, and VehicleBounds.
|
inline |
Definition at line 179 of file CarlaWheeledVehicle.h.
Referenced by FVehicleData::RestoreActorData().
|
private |
Rollovers tend to have too much angular velocity, resulting in the vehicle doing a full 360º flip.
This function progressively reduces the vehicle's angular velocity so that it ends up upside down instead.
Definition at line 994 of file CarlaWheeledVehicle.cpp.
References CheckRollover(), FailureState, GetVehicleTransform(), carla::rpc::None, RolloverBehaviorTracker, RolloverFlagTime, SetRolloverFlag(), and TimerHandler.
|
inline |
Definition at line 223 of file CarlaWheeledVehicle.h.
Referenced by FVehicleData::RestoreActorData().
|
inline |
Definition at line 208 of file CarlaWheeledVehicle.h.
Referenced by FVehicleData::RestoreActorData(), SetBrakeInput(), SetHandbrakeInput(), SetReverse(), SetSteeringInput(), SetThrottleInput(), and AWheeledVehicleAIController::Tick().
void ACarlaWheeledVehicle::ApplyVehiclePhysicsControl | ( | const FVehiclePhysicsControl & | PhysicsControl | ) |
Definition at line 546 of file CarlaWheeledVehicle.cpp.
References AckermannController, bIsNWVehicle, FVehiclePhysicsControl::bUseGearAutoBox, FVehiclePhysicsControl::CenterOfMass, FVehiclePhysicsControl::ClutchStrength, FVehiclePhysicsControl::DampingRateFullThrottle, FVehiclePhysicsControl::DampingRateZeroThrottleClutchDisengaged, FVehiclePhysicsControl::DampingRateZeroThrottleClutchEngaged, FVehicleNWGearData::DownRatio, FVehiclePhysicsControl::DragCoefficient, FVehiclePhysicsControl::FinalRatio, FVehiclePhysicsControl::ForwardGears, FVehiclePhysicsControl::GearSwitchTime, UCarlaStatics::GetRecorder(), LastPhysicsControl, FVehiclePhysicsControl::Mass, FVehiclePhysicsControl::MaxRPM, FVehiclePhysicsControl::MOI, PhysicsControl, FVehicleNWGearData::Ratio, ResetConstraints(), SetWheelCollision(), SetWheelCollisionNW(), FVehiclePhysicsControl::SteeringCurve, FVehiclePhysicsControl::TorqueCurve, FAckermannController::UpdateVehiclePhysics(), FVehicleNWGearData::UpRatio, and FVehiclePhysicsControl::Wheels.
Referenced by FVehicleData::RestoreActorData(), and RestoreVehiclePhysicsControl().
|
overrideprotectedvirtual |
Definition at line 97 of file CarlaWheeledVehicle.cpp.
References AckermannController, CollisionDisableConstraints, ConstraintComponentNames, ConstraintDoor, ConstraintsComponents, UDefaultMovementComponent::CreateDefaultMovementComponent(), DoorComponentsTransform, AFrictionTrigger::Friction, GetVehiclePhysicsControl(), LastPhysicsControl, ResetConstraints(), SetWheelsFrictionScale(), and FAckermannController::UpdateVehiclePhysics().
|
private |
Definition at line 1021 of file CarlaWheeledVehicle.cpp.
References RolloverBehaviorForce, and RolloverBehaviorTracker.
Referenced by ApplyRolloverBehavior().
void ACarlaWheeledVehicle::CloseDoor | ( | const EVehicleDoor | DoorIdx | ) |
Definition at line 933 of file CarlaWheeledVehicle.cpp.
References All, CloseDoorPhys(), and ConstraintsComponents.
void ACarlaWheeledVehicle::CloseDoorPhys | ( | const EVehicleDoor | DoorIdx | ) |
Definition at line 981 of file CarlaWheeledVehicle.cpp.
References ConstraintDoor, ConstraintsComponents, and DoorComponentsTransform.
Referenced by CloseDoor(), and ResetConstraints().
void ACarlaWheeledVehicle::DeactivateVelocityControl | ( | ) |
Definition at line 770 of file CarlaWheeledVehicle.cpp.
References VelocityControl.
void ACarlaWheeledVehicle::DrawFoliageBoundingBox | ( | ) | const |
Definition at line 219 of file CarlaWheeledVehicle.cpp.
References FoliageBoundingBox.
|
protectedvirtual |
Definition at line 911 of file CarlaWheeledVehicle.cpp.
References ShowDebugTelemetry().
void ACarlaWheeledVehicle::FlushVehicleControl | ( | ) |
Definition at line 290 of file CarlaWheeledVehicle.cpp.
References AckermannController, bAckermannControlActive, BaseMovementComponent, InputControl, INVALID, LastAppliedControl, UBaseCarlaMovementComponent::ProcessControl(), FAckermannController::RunLoop(), and FAckermannController::UpdateVehicleState().
Referenced by AWheeledVehicleAIController::Tick().
|
inline |
Definition at line 167 of file CarlaWheeledVehicle.h.
References PhysicsControl.
Referenced by FVehicleData::RecordActorData().
|
inline |
Definition at line 158 of file CarlaWheeledVehicle.h.
References State.
|
inline |
Definition at line 294 of file CarlaWheeledVehicle.h.
carla::rpc::VehicleFailureState ACarlaWheeledVehicle::GetFailureState | ( | ) | const |
Definition at line 1037 of file CarlaWheeledVehicle.cpp.
References FailureState.
Referenced by FVehicleData::RecordActorData().
TArray< int32 > ACarlaWheeledVehicle::GetFoliageInstancesCloseToVehicle | ( | const UInstancedStaticMeshComponent * | Component | ) | const |
Definition at line 211 of file CarlaWheeledVehicle.cpp.
References DetectionSize, and FoliageBoundingBox.
float ACarlaWheeledVehicle::GetMaximumSteerAngle | ( | ) | const |
Get the maximum angle at which the front wheel can steer.
Definition at line 277 of file CarlaWheeledVehicle.cpp.
Referenced by AWheeledVehicleAIController::OnPossess(), and FAckermannController::UpdateVehiclePhysics().
|
inline |
Vehicle Ackermann control currently applied to this vehicle.
Definition at line 100 of file CarlaWheeledVehicle.h.
Referenced by FVehicleData::RecordActorData().
|
inline |
Get vehicle's bounding box component.
Definition at line 135 of file CarlaWheeledVehicle.h.
FVector ACarlaWheeledVehicle::GetVehicleBoundingBoxExtent | ( | ) | const |
Extent of the vehicle's bounding box.
Definition at line 272 of file CarlaWheeledVehicle.cpp.
References VehicleBounds.
Referenced by IsThereAnObstacleAhead().
FTransform ACarlaWheeledVehicle::GetVehicleBoundingBoxTransform | ( | ) | const |
Transform of the vehicle's bounding box relative to the vehicle.
Definition at line 267 of file CarlaWheeledVehicle.cpp.
References VehicleBounds.
|
inline |
Vehicle control currently applied to this vehicle.
Definition at line 93 of file CarlaWheeledVehicle.h.
Referenced by UDefaultMovementComponent::ProcessControl(), FVehicleData::RecordActorData(), and FAckermannController::UpdateVehicleState().
int32 ACarlaWheeledVehicle::GetVehicleCurrentGear | ( | ) | const |
Active gear of the vehicle.
Definition at line 262 of file CarlaWheeledVehicle.cpp.
References BaseMovementComponent, and UBaseCarlaMovementComponent::GetVehicleCurrentGear().
float ACarlaWheeledVehicle::GetVehicleForwardSpeed | ( | ) | const |
Forward speed in cm/s. Might be negative if goes backwards.
Definition at line 252 of file CarlaWheeledVehicle.cpp.
References BaseMovementComponent, and UBaseCarlaMovementComponent::GetVehicleForwardSpeed().
Referenced by FAckermannController::UpdateVehicleState().
FVehicleLightState ACarlaWheeledVehicle::GetVehicleLightState | ( | ) | const |
Definition at line 536 of file CarlaWheeledVehicle.cpp.
References InputControl.
Referenced by FCarlaServer::FPimpl::BindActions(), and FVehicleData::RecordActorData().
FVector ACarlaWheeledVehicle::GetVehicleOrientation | ( | ) | const |
Orientation vector of the vehicle, pointing forward.
Definition at line 257 of file CarlaWheeledVehicle.cpp.
References GetVehicleTransform().
Referenced by IsThereAnObstacleAhead().
FVehiclePhysicsControl ACarlaWheeledVehicle::GetVehiclePhysicsControl | ( | ) | const |
Definition at line 373 of file CarlaWheeledVehicle.cpp.
References bIsNWVehicle, FVehiclePhysicsControl::bUseGearAutoBox, FVehiclePhysicsControl::CenterOfMass, FVehiclePhysicsControl::ClutchStrength, FWheelPhysicsControl::DampingRate, FVehiclePhysicsControl::DampingRateFullThrottle, FVehiclePhysicsControl::DampingRateZeroThrottleClutchDisengaged, FVehiclePhysicsControl::DampingRateZeroThrottleClutchEngaged, FGearPhysicsControl::DownRatio, FVehiclePhysicsControl::DragCoefficient, FVehiclePhysicsControl::FinalRatio, FVehiclePhysicsControl::ForwardGears, FVehiclePhysicsControl::GearSwitchTime, FWheelPhysicsControl::LatStiffMaxLoad, FWheelPhysicsControl::LatStiffValue, FWheelPhysicsControl::LongStiffValue, FVehiclePhysicsControl::Mass, FWheelPhysicsControl::MaxBrakeTorque, FWheelPhysicsControl::MaxHandBrakeTorque, FVehiclePhysicsControl::MaxRPM, FWheelPhysicsControl::MaxSteerAngle, FVehiclePhysicsControl::MOI, PhysicsControl, FWheelPhysicsControl::Position, FWheelPhysicsControl::Radius, FGearPhysicsControl::Ratio, FVehiclePhysicsControl::SteeringCurve, FWheelPhysicsControl::TireFriction, FVehiclePhysicsControl::TorqueCurve, FGearPhysicsControl::UpRatio, and FVehiclePhysicsControl::Wheels.
Referenced by ACarlaRecorder::AddPhysicsControl(), BeginPlay(), and FVehicleData::RecordActorData().
|
inline |
Transform of the vehicle.
Location is shifted so it matches center of the vehicle bounds rather than the actor's location.
Definition at line 108 of file CarlaWheeledVehicle.h.
Referenced by ApplyRolloverBehavior(), and GetVehicleOrientation().
|
overridevirtual |
Definition at line 906 of file CarlaWheeledVehicle.cpp.
References BaseMovementComponent, and UBaseCarlaMovementComponent::GetVelocity().
TArray< float > ACarlaWheeledVehicle::GetWheelsFrictionScale | ( | ) |
Definition at line 338 of file CarlaWheeledVehicle.cpp.
Referenced by AFrictionTrigger::OnTriggerBeginOverlap(), and AFrictionTrigger::OnTriggerEndOverlap().
float ACarlaWheeledVehicle::GetWheelSteerAngle | ( | EVehicleWheelLocation | WheelLocation | ) |
Definition at line 835 of file CarlaWheeledVehicle.cpp.
References bPhysicsEnabled.
|
inline |
Definition at line 276 of file CarlaWheeledVehicle.h.
|
inline |
Definition at line 230 of file CarlaWheeledVehicle.h.
Referenced by FVehicleData::RecordActorData().
bool ACarlaWheeledVehicle::IsInVehicleRange | ( | const FVector & | Location | ) | const |
Definition at line 203 of file CarlaWheeledVehicle.cpp.
References DetectionSize, and FoliageBoundingBox.
Referenced by AVegetationSpawner::UpdateProceduralInstanceCount().
bool ACarlaWheeledVehicle::IsTwoWheeledVehicle | ( | ) |
|
inlinevirtual |
Definition at line 196 of file CarlaWheeledVehicle.h.
void ACarlaWheeledVehicle::OpenDoor | ( | const EVehicleDoor | DoorIdx | ) |
Definition at line 916 of file CarlaWheeledVehicle.cpp.
References All, ConstraintsComponents, and OpenDoorPhys().
void ACarlaWheeledVehicle::OpenDoorPhys | ( | const EVehicleDoor | DoorIdx | ) |
Definition at line 950 of file CarlaWheeledVehicle.cpp.
References CollisionDisableConstraints, ConstraintDoor, ConstraintsComponents, DoorComponentsTransform, and DoorOpenStrength.
Referenced by OpenDoor(), and ResetConstraints().
|
protected |
|
inline |
Definition at line 282 of file CarlaWheeledVehicle.h.
|
protected |
Definition at line 894 of file CarlaWheeledVehicle.cpp.
References CloseDoorPhys(), ConstraintsComponents, and OpenDoorPhys().
Referenced by ApplyVehiclePhysicsControl(), BeginPlay(), and SetSimulatePhysics().
void ACarlaWheeledVehicle::RestoreVehiclePhysicsControl | ( | ) |
Definition at line 541 of file CarlaWheeledVehicle.cpp.
References ApplyVehiclePhysicsControl(), and LastPhysicsControl.
Referenced by UBaseCarlaMovementComponent::EnableUE4VehiclePhysics(), UCarSimManagerComponent::OnCarSimHit(), and UCarSimManagerComponent::OnCarSimOverlap().
|
inline |
Definition at line 152 of file CarlaWheeledVehicle.h.
References State.
Referenced by AWheeledVehicleAIController::ConfigureAutopilot().
void ACarlaWheeledVehicle::SetBrakeInput | ( | float | Value | ) |
Definition at line 317 of file CarlaWheeledVehicle.cpp.
References ApplyVehicleControl(), FVehicleControl::Brake, Control, and InputControl.
Referenced by AWheeledVehicleAIController::ConfigureAutopilot().
void ACarlaWheeledVehicle::SetCarlaMovementComponent | ( | UBaseCarlaMovementComponent * | MoementComponent | ) |
Definition at line 811 of file CarlaWheeledVehicle.cpp.
References BaseMovementComponent.
Referenced by UCarSimManagerComponent::CreateCarsimComponent(), UChronoMovementComponent::CreateChronoMovementComponent(), and UDefaultMovementComponent::CreateDefaultMovementComponent().
void ACarlaWheeledVehicle::SetFailureState | ( | const carla::rpc::VehicleFailureState & | FailureState | ) |
Definition at line 806 of file CarlaWheeledVehicle.cpp.
References FailureState.
Referenced by FVehicleData::RestoreActorData().
void ACarlaWheeledVehicle::SetHandbrakeInput | ( | bool | Value | ) |
Definition at line 331 of file CarlaWheeledVehicle.cpp.
References ApplyVehicleControl(), FVehicleControl::bHandBrake, Control, and InputControl.
Referenced by AWheeledVehicleAIController::ConfigureAutopilot().
void ACarlaWheeledVehicle::SetReverse | ( | bool | Value | ) |
Definition at line 324 of file CarlaWheeledVehicle.cpp.
References ApplyVehicleControl(), FVehicleControl::bReverse, Control, and InputControl.
Referenced by AWheeledVehicleAIController::ConfigureAutopilot().
void ACarlaWheeledVehicle::SetRolloverFlag | ( | ) |
Definition at line 1030 of file CarlaWheeledVehicle.cpp.
References FailureState, carla::rpc::Rollover, and RolloverBehaviorTracker.
Referenced by ApplyRolloverBehavior().
void ACarlaWheeledVehicle::SetSimulatePhysics | ( | bool | enabled | ) |
Definition at line 852 of file CarlaWheeledVehicle.cpp.
References bPhysicsEnabled, and ResetConstraints().
Referenced by FVehicleData::RestoreActorData().
void ACarlaWheeledVehicle::SetSteeringInput | ( | float | Value | ) |
Definition at line 310 of file CarlaWheeledVehicle.cpp.
References ApplyVehicleControl(), Control, InputControl, and FVehicleControl::Steer.
Referenced by AWheeledVehicleAIController::ConfigureAutopilot().
void ACarlaWheeledVehicle::SetThrottleInput | ( | float | Value | ) |
Definition at line 303 of file CarlaWheeledVehicle.cpp.
References ApplyVehicleControl(), Control, InputControl, and FVehicleControl::Throttle.
Referenced by AWheeledVehicleAIController::ConfigureAutopilot(), and UDefaultMovementComponent::ProcessControl().
void ACarlaWheeledVehicle::SetVehicleLightState | ( | const FVehicleLightState & | LightState | ) |
Definition at line 800 of file CarlaWheeledVehicle.cpp.
References InputControl, LightState, and RefreshLightState().
Referenced by FVehicleData::RestoreActorData().
void ACarlaWheeledVehicle::SetWheelCollision | ( | UWheeledVehicleMovementComponent4W * | Vehicle4W, |
const FVehiclePhysicsControl & | PhysicsControl | ||
) |
Definition at line 51 of file CarlaWheeledVehicle.cpp.
References IsTwoWheeledVehicle(), and FVehiclePhysicsControl::UseSweepWheelCollision.
Referenced by ApplyVehiclePhysicsControl().
void ACarlaWheeledVehicle::SetWheelCollisionNW | ( | UWheeledVehicleMovementComponentNW * | VehicleNW, |
const FVehiclePhysicsControl & | PhysicsControl | ||
) |
Definition at line 77 of file CarlaWheeledVehicle.cpp.
References FVehiclePhysicsControl::UseSweepWheelCollision.
Referenced by ApplyVehiclePhysicsControl().
void ACarlaWheeledVehicle::SetWheelsFrictionScale | ( | TArray< float > & | WheelsFrictionScale | ) |
Definition at line 355 of file CarlaWheeledVehicle.cpp.
Referenced by BeginPlay(), and AFrictionTrigger::UpdateWheelsFriction().
void ACarlaWheeledVehicle::SetWheelSteerDirection | ( | EVehicleWheelLocation | WheelLocation, |
float | AngleInDeg | ||
) |
Set the rotation of the car wheels indicated by the user 0 = FL_VehicleWheel, 1 = FR_VehicleWheel, 2 = BL_VehicleWheel, 3 = BR_VehicleWheel NOTE : This is purely aesthetic.
It will not modify the physics of the car in any way
Definition at line 820 of file CarlaWheeledVehicle.cpp.
References bPhysicsEnabled.
void ACarlaWheeledVehicle::ShowDebugTelemetry | ( | bool | Enabled | ) |
Definition at line 775 of file CarlaWheeledVehicle.cpp.
References ACarlaHUD::AddDebugVehicleForTelemetry(), and ACarlaHUD::DebugVehicle.
Referenced by EndPlay().
|
inline |
Definition at line 267 of file CarlaWheeledVehicle.h.
|
private |
Definition at line 350 of file CarlaWheeledVehicle.h.
Referenced by ApplyVehiclePhysicsControl(), BeginPlay(), and FlushVehicleControl().
|
private |
Definition at line 349 of file CarlaWheeledVehicle.h.
Referenced by FlushVehicleControl().
|
private |
Definition at line 416 of file CarlaWheeledVehicle.h.
Referenced by ACarlaWheeledVehicle(), FlushVehicleControl(), GetVehicleCurrentGear(), GetVehicleForwardSpeed(), GetVelocity(), and SetCarlaMovementComponent().
bool ACarlaWheeledVehicle::bIsNWVehicle = false |
Definition at line 403 of file CarlaWheeledVehicle.h.
Referenced by ACarlaWheeledVehicleNW::ACarlaWheeledVehicleNW(), ApplyVehiclePhysicsControl(), and GetVehiclePhysicsControl().
|
private |
Definition at line 412 of file CarlaWheeledVehicle.h.
Referenced by GetWheelSteerAngle(), SetSimulatePhysics(), and SetWheelSteerDirection().
float ACarlaWheeledVehicle::CarSimOriginOffset = 150.f |
Definition at line 399 of file CarlaWheeledVehicle.h.
Referenced by UCarSimManagerComponent::BeginPlay().
|
private |
Definition at line 429 of file CarlaWheeledVehicle.h.
Referenced by BeginPlay(), and OpenDoorPhys().
|
protected |
Definition at line 317 of file CarlaWheeledVehicle.h.
Referenced by BeginPlay().
|
private |
Definition at line 422 of file CarlaWheeledVehicle.h.
Referenced by BeginPlay(), CloseDoorPhys(), and OpenDoorPhys().
|
private |
Definition at line 419 of file CarlaWheeledVehicle.h.
Referenced by BeginPlay(), CloseDoor(), CloseDoorPhys(), OpenDoor(), OpenDoorPhys(), and ResetConstraints().
FVehicleControl ACarlaWheeledVehicle::Control |
Definition at line 340 of file CarlaWheeledVehicle.h.
Referenced by UChronoMovementComponent::CreateChronoMovementComponent(), SetBrakeInput(), SetHandbrakeInput(), SetReverse(), SetSteeringInput(), and SetThrottleInput().
float ACarlaWheeledVehicle::DetectionSize {200.0f} |
Definition at line 360 of file CarlaWheeledVehicle.h.
Referenced by GetFoliageInstancesCloseToVehicle(), and IsInVehicleRange().
|
private |
Definition at line 426 of file CarlaWheeledVehicle.h.
Referenced by BeginPlay(), CloseDoorPhys(), and OpenDoorPhys().
|
protected |
Definition at line 320 of file CarlaWheeledVehicle.h.
Referenced by OpenDoorPhys().
|
private |
Definition at line 356 of file CarlaWheeledVehicle.h.
Referenced by ApplyRolloverBehavior(), GetFailureState(), SetFailureState(), and SetRolloverFlag().
|
mutable |
Definition at line 363 of file CarlaWheeledVehicle.h.
Referenced by DrawFoliageBoundingBox(), GetFoliageInstancesCloseToVehicle(), and IsInVehicleRange().
struct { ... } ACarlaWheeledVehicle::InputControl |
|
private |
Definition at line 346 of file CarlaWheeledVehicle.h.
|
private |
Definition at line 345 of file CarlaWheeledVehicle.h.
Referenced by FlushVehicleControl().
|
private |
Definition at line 347 of file CarlaWheeledVehicle.h.
Referenced by ApplyVehiclePhysicsControl(), BeginPlay(), and RestoreVehiclePhysicsControl().
FVehicleLightState ACarlaWheeledVehicle::LightState |
Definition at line 341 of file CarlaWheeledVehicle.h.
Referenced by SetVehicleLightState().
EVehicleInputPriority ACarlaWheeledVehicle::Priority = EVehicleInputPriority::INVALID |
Definition at line 339 of file CarlaWheeledVehicle.h.
|
private |
Definition at line 352 of file CarlaWheeledVehicle.h.
Referenced by CheckRollover().
|
private |
Definition at line 353 of file CarlaWheeledVehicle.h.
Referenced by ApplyRolloverBehavior(), CheckRollover(), and SetRolloverFlag().
|
private |
Definition at line 354 of file CarlaWheeledVehicle.h.
Referenced by ApplyRolloverBehavior().
|
private |
Current state of the vehicle controller (for debugging purposes).
Definition at line 329 of file CarlaWheeledVehicle.h.
|
private |
Definition at line 438 of file CarlaWheeledVehicle.h.
Referenced by ApplyRolloverBehavior().
|
private |
Definition at line 332 of file CarlaWheeledVehicle.h.
Referenced by ACarlaWheeledVehicle(), AdjustVehicleBounds(), GetVehicleBoundingBoxExtent(), and GetVehicleBoundingBoxTransform().
|
private |
Definition at line 335 of file CarlaWheeledVehicle.h.
Referenced by ACarlaWheeledVehicle(), ActivateVelocityControl(), and DeactivateVelocityControl().