Not sure this is the correct way to go but you could try something like this (check pointers for null first though) StaticMeshActor->GetStaticMeshComponent()->GetBodySetup()->AggGeom.ConvexElems[INDEX].GetChaosConvexMesh()
The GetChaosConvexMesh() returns a TSharedPtr<Chaos::FConvex, ESPMode::ThreadSafe>
This might be a silly question:
Can you tell me how I get a Chaos::FConvex out of that TSharedPtr?
Because the Chaos::GJKDistance Function wants a Chaos::FConvex Object, not a pointer
Many greetings,
Alex
Edit:
Solved, thanks to UnrealEverything:
The
TSharedPtr<Chaos::FConvex, ESPMode::ThreadSafe> has a method ->Get() which gives you the pointer to the FConvex object.