49 void OnPossess(
APawn *aPawn)
override;
51 void OnUnPossess()
override;
53 void Tick(
float DeltaTime)
override;
63 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
64 bool IsPossessingAVehicle()
const
69 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
86 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
87 void SetStickyControl(
bool bEnabled)
89 bControlIsSticky = bEnabled;
105 UFUNCTION(Category =
"Road Map", BlueprintCallable)
119 UFUNCTION(Category =
"Random Engine", BlueprintCallable)
122 check(RandomEngine !=
nullptr);
134 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
135 bool IsAutopilotEnabled()
const
137 return bAutopilotEnabled;
140 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
141 void SetAutopilot(
bool Enable,
bool KeepState = false)
143 if (IsAutopilotEnabled() != Enable)
145 ConfigureAutopilot(Enable, KeepState);
149 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
150 void ToggleAutopilot()
152 ConfigureAutopilot(!bAutopilotEnabled);
157 void ConfigureAutopilot(
const bool Enable,
const bool KeepState =
false);
168 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
169 float GetSpeedLimit()
const
175 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
176 void SetSpeedLimit(
float InSpeedLimit)
178 SpeedLimit = InSpeedLimit;
182 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
185 return TrafficLightState;
189 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
192 TrafficLightState = InTrafficLightState;
196 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
203 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
210 UFUNCTION(Category =
"Wheeled Vehicle Controller", BlueprintCallable)
211 void SetFixedRoute(
const TArray<FVector> &Locations,
bool bOverwriteCurrent =
true);
226 UPROPERTY(VisibleAnywhere)
227 bool bAutopilotEnabled = false;
229 UPROPERTY(VisibleAnywhere)
230 bool bControlIsSticky = true;
232 UPROPERTY(VisibleAnywhere)
233 float SpeedLimit = 30.0f;
235 UPROPERTY(VisibleAnywhere)
238 UPROPERTY(VisibleAnywhere)
239 float MaximumSteerAngle = -1.0f;
244 std::queue<FVector> TargetLocations;