Completely agree regarding performance, but practically I see a lot of cases where physics’ math in components is relatively simple. Something like an air drag component is just 1/2V^2RoSDs, which fits into a single math expression and so much easy for people to build in BP without touching C++. That’s kind of the point of design - to have just a few components written in C++ and the rest keep in BP as long as performance impact is negligible.
I don’t even know if it will work I’ve just found few post like this: https://answers.unrealengine.com/questions/214147/grand-unified-cblueprint-cast-interface-explanatio.html which explain how BP code can be called from C++.
I guess the easiest way for BP code, executed from C++, to see FBodyInstance transform is by adding few methods into C++ based components which would retrieve FBodyInstance from SceneComponent reference and pass it to BP. I mean it’s not really passing transforms, it’s more like, let’s say we want to find a distance between two arbitrary components.
//Normally in BP we would do it like this:
VectorLength(Comp1.GetWorldLocation() - Comp2.GetWorldLocation())
//But here we would take a bit more complicated rout, which potentially works with sub-stepping:
Comp1Pos = VMK_PhysicsController.GetLocationByReference(Comp1);
Comp2Pos = VMK_PhysicsController.GetLocationByReference(Comp2);
VectorLength(Comp1.GetWorldLocation() - Comp2.GetWorldLocation());
//where VMK_PhysicsController.GetLocationByReference() would do something like this:
GetLocationByReference(ReferenceComponent){
RefComp = Find component by reference(ReferenceComponent); //
RefLocation = RefComp.FBodyInstance.Transform.Location();
return RefLocation;
}