From 2d52245d3e67dd58454d963887cd4fc3f5ef02fb Mon Sep 17 00:00:00 2001 From: nsubiron Date: Mon, 23 Apr 2018 10:57:05 +0200 Subject: [PATCH] Fix #371 bounding box was scaled twice when computing map intersection --- .../Carla/Source/Carla/Vehicle/CarlaVehicleController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/CarlaVehicleController.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/CarlaVehicleController.cpp index fb77bac0426..33e25d66bc1 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/CarlaVehicleController.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/CarlaVehicleController.cpp @@ -119,7 +119,7 @@ void ACarlaVehicleController::IntersectPlayerWithRoadMap() check(BoundingBox != nullptr); auto Result = RoadMap->Intersect( BoundingBox->GetComponentTransform(), - Vehicle->GetVehicleBoundingBoxExtent(), // Get scaled bounding box extent. + BoundingBox->GetUnscaledBoxExtent(), ChecksPerCentimeter); CarlaPlayerState->OffRoadIntersectionFactor = Result.OffRoad;