diff --git a/Source/StevesUEHelpers/Private/StevesMathHelpers.cpp b/Source/StevesUEHelpers/Private/StevesMathHelpers.cpp index 55f9ea9..70ff54b 100644 --- a/Source/StevesUEHelpers/Private/StevesMathHelpers.cpp +++ b/Source/StevesUEHelpers/Private/StevesMathHelpers.cpp @@ -12,10 +12,20 @@ bool StevesMathHelpers::OverlapConvex(const FKConvexElem& Convex, FMTDResult& OutResult) { const FPhysicsShapeAdapter ShapeAdapter(ShapeRot, Shape); +#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 4 + const Chaos::FConvexPtr& ChaosConvex = Convex.GetChaosConvexMesh(); +#else const TSharedPtr& ChaosConvex = Convex.GetChaosConvexMesh(); +#endif if (!ChaosConvex.IsValid()) return false; +#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 4 + const auto& ChaosConvexObj = *ChaosConvex.GetReference(); +#else + const auto& ChaosConvexObj = *ChaosConvex.Get(); +#endif + const Chaos::FImplicitObject& ShapeGeom = ShapeAdapter.GetGeometry(); const FTransform& ShapeGeomTransform = ShapeAdapter.GetGeomPose(ShapePos); @@ -28,7 +38,7 @@ bool StevesMathHelpers::OverlapConvex(const FKConvexElem& Convex, ShapeGeomTransform, [&](const auto& Downcast, const auto& FullGeomTransform) { - return Chaos::OverlapQuery(*ChaosConvex.Get(), + return Chaos::OverlapQuery(ChaosConvexObj, ConvexTransform, Downcast, FullGeomTransform, diff --git a/Source/StevesUEHelpers/Private/StevesVisualLogger.cpp b/Source/StevesUEHelpers/Private/StevesVisualLogger.cpp index 31f1635..595539e 100644 --- a/Source/StevesUEHelpers/Private/StevesVisualLogger.cpp +++ b/Source/StevesUEHelpers/Private/StevesVisualLogger.cpp @@ -21,7 +21,11 @@ void FStevesVisualLogger::InternalPolyLogfImpl(const UObject* Object, } // EVisualLoggerShapeElement::Path doesn't support a label, so description is always blank +#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 4 + CurrentEntry->AddPath(Points, CategoryName, Verbosity, Color, "", Thickness); +#else CurrentEntry->AddElement(Points, CategoryName, Verbosity, Color, "", Thickness); - +#endif + #endif }