Disable Wheel Sweep for bikes

This commit is contained in:
Daniel Santos-Olivan 2020-11-26 14:25:26 +01:00 committed by Axel1092
parent 937eb73bfa
commit 4d635d5c92
2 changed files with 10 additions and 0 deletions

View File

@ -42,6 +42,10 @@ void ACarlaWheeledVehicle::SetWheelCollision(UWheeledVehicleMovementComponent4W
const FVehiclePhysicsControl &PhysicsControl ) {
#ifdef WHEEL_SWEEP_ENABLED
const bool IsBike = IsTwoWheeledVehicle();
if (IsBike)
return;
const bool IsEqual = Vehicle4W->UseSweepWheelCollision == PhysicsControl.UseSweepWheelCollision;

View File

@ -122,6 +122,12 @@ public:
void SetVehicleLightState(const FVehicleLightState &LightState);
UFUNCTION(BlueprintNativeEvent)
bool IsTwoWheeledVehicle();
virtual bool IsTwoWheeledVehicle_Implementation() {
return false;
}
/// @}
// ===========================================================================
/// @name Vehicle input control