From fba2bd4b3eca18ab62d6c5ea0607c3b20e91d030 Mon Sep 17 00:00:00 2001 From: Daniel Santos-Olivan Date: Thu, 2 Sep 2021 10:43:06 +0200 Subject: [PATCH] CarlaWheeledVehicle: Stop being simulated with telemetry Until now, when the client asked to stop the telemetry, the information was begin removed in the HUD but it was still being simulated with telemetry data. Now, we call the new method to stop the telemetry to completely removed this behaviour. --- .../Carla/Source/Carla/Vehicle/CarlaWheeledVehicle.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/CarlaWheeledVehicle.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/CarlaWheeledVehicle.cpp index 61e40e5b0..6b4c7cf3e 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/CarlaWheeledVehicle.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/CarlaWheeledVehicle.cpp @@ -482,8 +482,10 @@ void ACarlaWheeledVehicle::ShowDebugTelemetry(bool Enabled) hud->AddDebugVehicleForTelemetry(GetVehicleMovementComponent()); } else{ - if (hud->DebugVehicle == GetVehicleMovementComponent()) + if (hud->DebugVehicle == GetVehicleMovementComponent()) { hud->AddDebugVehicleForTelemetry(nullptr); + GetVehicleMovementComponent()->StopTelemetry(); + } } }