8 #include "WheeledVehicleMovementComponent.h" 9 #include "Curves/CurveFloat.h" 10 #include "WheeledVehicleMovementComponentNW.generated.h" 14 class PxVehicleWheelData;
20 GENERATED_USTRUCT_BODY()
23 UPROPERTY(EditAnywhere, Category = Setup)
34 GENERATED_USTRUCT_BODY()
37 UPROPERTY(EditAnywhere, Category = Setup)
38 FRuntimeFloatCurve TorqueCurve;
41 UPROPERTY(EditAnywhere, Category = Setup, meta = (ClampMin = "0.01", UIMin = "0.01"))
45 UPROPERTY(EditAnywhere, Category = Setup, meta = (ClampMin = "0.01", UIMin = "0.01"))
49 UPROPERTY(EditAnywhere, Category = Setup, AdvancedDisplay, meta = (ClampMin = "0.0", UIMin = "0.0"))
50 float DampingRateFullThrottle;
53 UPROPERTY(EditAnywhere, Category = Setup, AdvancedDisplay, meta = (ClampMin = "0.0", UIMin = "0.0"))
54 float DampingRateZeroThrottleClutchEngaged;
57 UPROPERTY(EditAnywhere, Category = Setup, AdvancedDisplay, meta = (ClampMin = "0.0", UIMin = "0.0"))
58 float DampingRateZeroThrottleClutchDisengaged;
61 float FindPeakTorque() const;
67 GENERATED_USTRUCT_BODY()
70 UPROPERTY(EditAnywhere, Category = Setup)
74 UPROPERTY(EditAnywhere, meta = (ClampMin = "0.0", UIMin = "0.0", ClampMax = "1.0", UIMax = "1.0"), Category = Setup)
78 UPROPERTY(EditAnywhere, meta = (ClampMin = "0.0", UIMin = "0.0", ClampMax = "1.0", UIMax = "1.0"), Category = Setup)
85 GENERATED_USTRUCT_BODY()
87 UPROPERTY(EditAnywhere, Category = VehicleSetup, meta = (DisplayName =
"Automatic Transmission"))
91 UPROPERTY(EditAnywhere, Category = Setup, meta = (ClampMin = "0.0", UIMin = "0.0"))
95 UPROPERTY(EditAnywhere, Category = Setup, meta = (editcondition = "bUseGearAutoBox", ClampMin = "0.0", UIMin = "0.0"))
96 float GearAutoBoxLatency;
99 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Setup)
103 UPROPERTY(EditAnywhere, Category = Setup, AdvancedDisplay)
107 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Setup)
108 float ReverseGearRatio;
111 UPROPERTY(EditAnywhere, AdvancedDisplay, Category = Setup, meta = (ClampMin = "0.0", UIMin = "0.0", ClampMax = "1.0", UIMax = "1.0"))
112 float NeutralGearUpRatio;
115 UPROPERTY(EditAnywhere, Category = Setup, AdvancedDisplay, meta = (ClampMin = "0.0", UIMin = "0.0"))
116 float ClutchStrength;
119 UCLASS(ClassGroup = (Physics), meta = (BlueprintSpawnableComponent), hidecategories = (PlanarMovement, "Components|Movement|Planar", Activation, "Components|Activation"))
120 class CARLA_API UWheeledVehicleMovementComponentNW : public UWheeledVehicleMovementComponent
122 GENERATED_UCLASS_BODY()
125 UPROPERTY(EditAnywhere, Category = MechanicalSetup)
129 UPROPERTY(EditAnywhere, Category = MechanicalSetup)
130 TArray<FVehicleNWWheelDifferentialData> DifferentialSetup;
133 UPROPERTY(EditAnywhere, Category = MechanicalSetup)
137 UPROPERTY(EditAnywhere, Category = SteeringSetup)
138 FRuntimeFloatCurve SteeringCurve;
140 virtual void Serialize(FArchive& Ar)
override;
141 virtual void ComputeConstants()
override;
143 virtual void PostEditChangeProperty(
struct FPropertyChangedEvent& PropertyChangedEvent)
override;
148 virtual const void* GetTireData(physx::PxVehicleWheels* Wheels, UVehicleWheel* Wheel);
149 virtual const int32 GetWheelShapeMapping(physx::PxVehicleWheels* Wheels, uint32 Wheel);
150 virtual const physx::PxVehicleWheelData GetWheelData(physx::PxVehicleWheels* Wheels, uint32 Wheel);
153 virtual void SetupVehicle()
override;
155 virtual int32 GetCustomGearBoxNumForwardGears()
const;
157 virtual void UpdateSimulation(
float DeltaTime)
override;
163 virtual void UpdateDifferentialSetup(
const TArray<FVehicleNWWheelDifferentialData>& NewDifferentialSetup);