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... | |
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 { 750.0f } |
FBox | FoliageBoundingBox |
UBoxComponent * | VehicleBounds |
float | CarSimOriginOffset = 150.f |
bool | bIsNWVehicle = false |
FBox | GetDetectionBox () const |
float | GetDetectionSize () const |
void | UpdateDetectionBox () |
const TArray< int32 > | GetFoliageInstancesCloseToVehicle (const UInstancedStaticMeshComponent *Component) const |
void | DrawFoliageBoundingBox () const |
FBoxSphereBounds | GetBoxSphereBounds () 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) |
void | AddReferenceToManager () |
void | RemoveReferenceToManager () |
Base class for CARLA wheeled vehicles.
Definition at line 70 of file CarlaWheeledVehicle.h.
ACarlaWheeledVehicle::ACarlaWheeledVehicle | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 35 of file CarlaWheeledVehicle.cpp.
References BaseMovementComponent, VehicleBounds, and VelocityControl.
ACarlaWheeledVehicle::~ACarlaWheeledVehicle | ( | ) |
Definition at line 50 of file CarlaWheeledVehicle.cpp.
void ACarlaWheeledVehicle::ActivateVelocityControl | ( | const FVector & | Velocity | ) |
Definition at line 793 of file CarlaWheeledVehicle.cpp.
References VelocityControl.
|
private |
Definition at line 1071 of file CarlaWheeledVehicle.cpp.
References AVegetationManager::AddVehicle(), and IsValid().
Referenced by BeginPlay().
|
protected |
Definition at line 257 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 1024 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 574 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 98 of file CarlaWheeledVehicle.cpp.
References AckermannController, AddReferenceToManager(), CollisionDisableConstraints, ConstraintComponentNames, ConstraintDoor, ConstraintsComponents, UDefaultMovementComponent::CreateDefaultMovementComponent(), DoorComponentsTransform, AFrictionTrigger::Friction, GetVehiclePhysicsControl(), LastPhysicsControl, ResetConstraints(), SetWheelsFrictionScale(), and FAckermannController::UpdateVehiclePhysics().
|
private |
Definition at line 1051 of file CarlaWheeledVehicle.cpp.
References RolloverBehaviorForce, and RolloverBehaviorTracker.
Referenced by ApplyRolloverBehavior().
void ACarlaWheeledVehicle::CloseDoor | ( | const EVehicleDoor | DoorIdx | ) |
Definition at line 963 of file CarlaWheeledVehicle.cpp.
References All, CloseDoorPhys(), and ConstraintsComponents.
void ACarlaWheeledVehicle::CloseDoorPhys | ( | const EVehicleDoor | DoorIdx | ) |
Definition at line 1011 of file CarlaWheeledVehicle.cpp.
References ConstraintDoor, ConstraintsComponents, and DoorComponentsTransform.
Referenced by CloseDoor(), and ResetConstraints().
void ACarlaWheeledVehicle::DeactivateVelocityControl | ( | ) |
Definition at line 798 of file CarlaWheeledVehicle.cpp.
References VelocityControl.
void ACarlaWheeledVehicle::DrawFoliageBoundingBox | ( | ) | const |
Definition at line 238 of file CarlaWheeledVehicle.cpp.
References FoliageBoundingBox.
|
protectedvirtual |
Definition at line 939 of file CarlaWheeledVehicle.cpp.
References RemoveReferenceToManager(), and ShowDebugTelemetry().
void ACarlaWheeledVehicle::FlushVehicleControl | ( | ) |
Definition at line 320 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.
FBoxSphereBounds ACarlaWheeledVehicle::GetBoxSphereBounds | ( | ) | const |
Definition at line 246 of file CarlaWheeledVehicle.cpp.
References UCarlaStatics::GetLargeMapManager(), ALargeMapManager::LocalToGlobalTransform(), and VehicleBounds.
|
inline |
Definition at line 294 of file CarlaWheeledVehicle.h.
FBox ACarlaWheeledVehicle::GetDetectionBox | ( | ) | const |
Definition at line 227 of file CarlaWheeledVehicle.cpp.
References FoliageBoundingBox.
float ACarlaWheeledVehicle::GetDetectionSize | ( | ) | const |
Definition at line 233 of file CarlaWheeledVehicle.cpp.
References DetectionSize.
carla::rpc::VehicleFailureState ACarlaWheeledVehicle::GetFailureState | ( | ) | const |
Definition at line 1067 of file CarlaWheeledVehicle.cpp.
References FailureState.
Referenced by FVehicleData::RecordActorData().
const TArray< int32 > ACarlaWheeledVehicle::GetFoliageInstancesCloseToVehicle | ( | const UInstancedStaticMeshComponent * | Component | ) | const |
Definition at line 221 of file CarlaWheeledVehicle.cpp.
References FoliageBoundingBox.
float ACarlaWheeledVehicle::GetMaximumSteerAngle | ( | ) | const |
Get the maximum angle at which the front wheel can steer.
Definition at line 307 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 302 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 297 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(), FSparseHighDetailMap::SaveMap(), and FAckermannController::UpdateVehicleState().
int32 ACarlaWheeledVehicle::GetVehicleCurrentGear | ( | ) | const |
Active gear of the vehicle.
Definition at line 292 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 282 of file CarlaWheeledVehicle.cpp.
References BaseMovementComponent, and UBaseCarlaMovementComponent::GetVehicleForwardSpeed().
Referenced by FAckermannController::UpdateVehicleState().
FVehicleLightState ACarlaWheeledVehicle::GetVehicleLightState | ( | ) | const |
Definition at line 564 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 287 of file CarlaWheeledVehicle.cpp.
References GetVehicleTransform().
Referenced by IsThereAnObstacleAhead().
FVehiclePhysicsControl ACarlaWheeledVehicle::GetVehiclePhysicsControl | ( | ) | const |
Definition at line 401 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 FFrameData::AddPhysicsControl(), 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 934 of file CarlaWheeledVehicle.cpp.
References BaseMovementComponent, and UBaseCarlaMovementComponent::GetVelocity().
Referenced by FSparseHighDetailMap::SaveMap().
TArray< float > ACarlaWheeledVehicle::GetWheelsFrictionScale | ( | ) |
Definition at line 368 of file CarlaWheeledVehicle.cpp.
Referenced by AFrictionTrigger::OnTriggerBeginOverlap(), and AFrictionTrigger::OnTriggerEndOverlap().
float ACarlaWheeledVehicle::GetWheelSteerAngle | ( | EVehicleWheelLocation | WheelLocation | ) |
Definition at line 863 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 205 of file CarlaWheeledVehicle.cpp.
References FoliageBoundingBox.
bool ACarlaWheeledVehicle::IsTwoWheeledVehicle | ( | ) |
|
inlinevirtual |
Definition at line 196 of file CarlaWheeledVehicle.h.
void ACarlaWheeledVehicle::OpenDoor | ( | const EVehicleDoor | DoorIdx | ) |
Definition at line 946 of file CarlaWheeledVehicle.cpp.
References All, ConstraintsComponents, and OpenDoorPhys().
void ACarlaWheeledVehicle::OpenDoorPhys | ( | const EVehicleDoor | DoorIdx | ) |
Definition at line 980 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.
|
private |
Definition at line 1086 of file CarlaWheeledVehicle.cpp.
References IsValid(), and AVegetationManager::RemoveVehicle().
Referenced by EndPlay().
|
protected |
Definition at line 922 of file CarlaWheeledVehicle.cpp.
References CloseDoorPhys(), ConstraintsComponents, and OpenDoorPhys().
Referenced by ApplyVehiclePhysicsControl(), BeginPlay(), and SetSimulatePhysics().
void ACarlaWheeledVehicle::RestoreVehiclePhysicsControl | ( | ) |
Definition at line 569 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 347 of file CarlaWheeledVehicle.cpp.
References ApplyVehicleControl(), FVehicleControl::Brake, Control, and InputControl.
Referenced by AWheeledVehicleAIController::ConfigureAutopilot().
void ACarlaWheeledVehicle::SetCarlaMovementComponent | ( | UBaseCarlaMovementComponent * | MoementComponent | ) |
Definition at line 839 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 834 of file CarlaWheeledVehicle.cpp.
References FailureState.
Referenced by FVehicleData::RestoreActorData().
void ACarlaWheeledVehicle::SetHandbrakeInput | ( | bool | Value | ) |
Definition at line 361 of file CarlaWheeledVehicle.cpp.
References ApplyVehicleControl(), FVehicleControl::bHandBrake, Control, and InputControl.
Referenced by AWheeledVehicleAIController::ConfigureAutopilot().
void ACarlaWheeledVehicle::SetReverse | ( | bool | Value | ) |
Definition at line 354 of file CarlaWheeledVehicle.cpp.
References ApplyVehicleControl(), FVehicleControl::bReverse, Control, and InputControl.
Referenced by AWheeledVehicleAIController::ConfigureAutopilot().
void ACarlaWheeledVehicle::SetRolloverFlag | ( | ) |
Definition at line 1060 of file CarlaWheeledVehicle.cpp.
References FailureState, carla::rpc::Rollover, and RolloverBehaviorTracker.
Referenced by ApplyRolloverBehavior().
void ACarlaWheeledVehicle::SetSimulatePhysics | ( | bool | enabled | ) |
Definition at line 880 of file CarlaWheeledVehicle.cpp.
References bPhysicsEnabled, and ResetConstraints().
Referenced by FVehicleData::RestoreActorData().
void ACarlaWheeledVehicle::SetSteeringInput | ( | float | Value | ) |
Definition at line 340 of file CarlaWheeledVehicle.cpp.
References ApplyVehicleControl(), Control, InputControl, and FVehicleControl::Steer.
Referenced by AWheeledVehicleAIController::ConfigureAutopilot().
void ACarlaWheeledVehicle::SetThrottleInput | ( | float | Value | ) |
Definition at line 333 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 828 of file CarlaWheeledVehicle.cpp.
References InputControl, LightState, and RefreshLightState().
Referenced by FVehicleData::RestoreActorData().
void ACarlaWheeledVehicle::SetWheelCollision | ( | UWheeledVehicleMovementComponent4W * | Vehicle4W, |
const FVehiclePhysicsControl & | PhysicsControl | ||
) |
Definition at line 52 of file CarlaWheeledVehicle.cpp.
References IsTwoWheeledVehicle(), and FVehiclePhysicsControl::UseSweepWheelCollision.
Referenced by ApplyVehiclePhysicsControl().
void ACarlaWheeledVehicle::SetWheelCollisionNW | ( | UWheeledVehicleMovementComponentNW * | VehicleNW, |
const FVehiclePhysicsControl & | PhysicsControl | ||
) |
Definition at line 78 of file CarlaWheeledVehicle.cpp.
References FVehiclePhysicsControl::UseSweepWheelCollision.
Referenced by ApplyVehiclePhysicsControl().
void ACarlaWheeledVehicle::SetWheelsFrictionScale | ( | TArray< float > & | WheelsFrictionScale | ) |
Definition at line 385 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 848 of file CarlaWheeledVehicle.cpp.
References bPhysicsEnabled.
void ACarlaWheeledVehicle::ShowDebugTelemetry | ( | bool | Enabled | ) |
Definition at line 803 of file CarlaWheeledVehicle.cpp.
References ACarlaHUD::AddDebugVehicleForTelemetry(), and ACarlaHUD::DebugVehicle.
Referenced by EndPlay().
|
inline |
Definition at line 267 of file CarlaWheeledVehicle.h.
void ACarlaWheeledVehicle::UpdateDetectionBox | ( | ) |
Definition at line 212 of file CarlaWheeledVehicle.cpp.
References DetectionSize, and FoliageBoundingBox.
|
private |
Definition at line 347 of file CarlaWheeledVehicle.h.
Referenced by ApplyVehiclePhysicsControl(), BeginPlay(), and FlushVehicleControl().
|
private |
Definition at line 346 of file CarlaWheeledVehicle.h.
Referenced by FlushVehicleControl().
|
private |
Definition at line 428 of file CarlaWheeledVehicle.h.
Referenced by ACarlaWheeledVehicle(), FlushVehicleControl(), GetVehicleCurrentGear(), GetVehicleForwardSpeed(), GetVelocity(), and SetCarlaMovementComponent().
bool ACarlaWheeledVehicle::bIsNWVehicle = false |
Definition at line 415 of file CarlaWheeledVehicle.h.
Referenced by ACarlaWheeledVehicleNW::ACarlaWheeledVehicleNW(), ApplyVehiclePhysicsControl(), and GetVehiclePhysicsControl().
|
private |
Definition at line 424 of file CarlaWheeledVehicle.h.
Referenced by GetWheelSteerAngle(), SetSimulatePhysics(), and SetWheelSteerDirection().
float ACarlaWheeledVehicle::CarSimOriginOffset = 150.f |
Definition at line 411 of file CarlaWheeledVehicle.h.
Referenced by UCarSimManagerComponent::BeginPlay().
|
private |
Definition at line 441 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 434 of file CarlaWheeledVehicle.h.
Referenced by BeginPlay(), CloseDoorPhys(), and OpenDoorPhys().
|
private |
Definition at line 431 of file CarlaWheeledVehicle.h.
Referenced by BeginPlay(), CloseDoor(), CloseDoorPhys(), OpenDoor(), OpenDoorPhys(), and ResetConstraints().
FVehicleControl ACarlaWheeledVehicle::Control |
Definition at line 337 of file CarlaWheeledVehicle.h.
Referenced by UChronoMovementComponent::CreateChronoMovementComponent(), SetBrakeInput(), SetHandbrakeInput(), SetReverse(), SetSteeringInput(), and SetThrottleInput().
float ACarlaWheeledVehicle::DetectionSize { 750.0f } |
Definition at line 357 of file CarlaWheeledVehicle.h.
Referenced by GetDetectionSize(), and UpdateDetectionBox().
|
private |
Definition at line 438 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 353 of file CarlaWheeledVehicle.h.
Referenced by ApplyRolloverBehavior(), GetFailureState(), SetFailureState(), and SetRolloverFlag().
FBox ACarlaWheeledVehicle::FoliageBoundingBox |
Definition at line 360 of file CarlaWheeledVehicle.h.
Referenced by DrawFoliageBoundingBox(), GetDetectionBox(), GetFoliageInstancesCloseToVehicle(), IsInVehicleRange(), and UpdateDetectionBox().
struct { ... } ACarlaWheeledVehicle::InputControl |
|
private |
Definition at line 343 of file CarlaWheeledVehicle.h.
|
private |
Definition at line 342 of file CarlaWheeledVehicle.h.
Referenced by FlushVehicleControl().
|
private |
Definition at line 344 of file CarlaWheeledVehicle.h.
Referenced by ApplyVehiclePhysicsControl(), BeginPlay(), and RestoreVehiclePhysicsControl().
FVehicleLightState ACarlaWheeledVehicle::LightState |
Definition at line 338 of file CarlaWheeledVehicle.h.
Referenced by SetVehicleLightState().
EVehicleInputPriority ACarlaWheeledVehicle::Priority = EVehicleInputPriority::INVALID |
Definition at line 336 of file CarlaWheeledVehicle.h.
|
private |
Definition at line 349 of file CarlaWheeledVehicle.h.
Referenced by CheckRollover().
|
private |
Definition at line 350 of file CarlaWheeledVehicle.h.
Referenced by ApplyRolloverBehavior(), CheckRollover(), and SetRolloverFlag().
|
private |
Definition at line 351 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 454 of file CarlaWheeledVehicle.h.
Referenced by ApplyRolloverBehavior().
UBoxComponent* ACarlaWheeledVehicle::VehicleBounds |
Definition at line 363 of file CarlaWheeledVehicle.h.
Referenced by ACarlaWheeledVehicle(), AdjustVehicleBounds(), GetBoxSphereBounds(), GetVehicleBoundingBoxExtent(), and GetVehicleBoundingBoxTransform().
|
private |
Definition at line 332 of file CarlaWheeledVehicle.h.
Referenced by ACarlaWheeledVehicle(), ActivateVelocityControl(), and DeactivateVelocityControl().