57 chrono::ChSystemNSC Sys;
58 std::shared_ptr<chrono::vehicle::WheeledVehicle>
Vehicle;
59 std::shared_ptr<UERayCastTerrain> Terrain;
62 uint64_t MaxSubsteps = 10;
63 float MaxSubstepDeltaTime = 0.01;
65 FString VehicleJSON =
"hmmwv/vehicle/HMMWV_Vehicle.json";
66 FString PowertrainJSON =
"hmmwv/powertrain/HMMWV_ShaftsPowertrain.json";
67 FString TireJSON =
"hmmwv/tire/HMMWV_Pac02Tire.json";
68 FString BaseJSONPath =
"";
73 static void CreateChronoMovementComponent(
76 float MaxSubstepDeltaTime,
77 FString VehicleJSON =
"",
78 FString PowertrainJSON =
"",
79 FString TireJSON =
"",
80 FString BaseJSONPath =
"");
83 virtual void BeginPlay()
override;
85 void InitializeChronoVehicle();
89 void TickComponent(
float DeltaTime,
91 FActorComponentTickFunction* ThisTickFunction)
override;
93 void AdvanceChronoSimulation(
float StepSize);
95 virtual FVector GetVelocity()
const override;
97 virtual int32 GetVehicleCurrentGear()
const override;
99 virtual float GetVehicleForwardSpeed()
const override;
101 virtual void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
104 virtual void DisableSpecialPhysics()
override;
108 void DisableChronoPhysics();
111 void OnVehicleHit(
AActor *Actor,
113 FVector NormalImpulse,
114 const FHitResult &Hit);
122 int32 OtherBodyIndex,
124 const FHitResult & SweepResult);