How To Set Up A Graph Trace To Determine What Material A Character Is Standing On

So I set up a trace in my blueprint for objects and added a make array element as input. However, I cannot find what array element would specify a material. Or, do I set the trace for ‘visibility’ and not ‘object’?

OK. So, I found that a parameter “bReturnPhysicalMaterial” must be set or set to true. I presume that the parameter is associated with a specific trace setup?? Or, with a material?? Where and how do I set it? So, far I have not been able to determine that. I am using blueprints, not coding…

You can do a line trace to the object beneath a character, then break the hit result. One of the properties in the break hit result is called “physmat.”

That gets a return of ‘default material’. I think I need to set a ‘bReturnPhysicalMaterial’ parameter in either the material or a material instance, but I have not figured that out yet.

If you get a default material you need to

(a) make sure the material has a physical material assigned to it
(b) define your physical materials in the physics area of your project settings

once you’ve defined your physical materials in engine (may need to restart to take effect) UE automatically adds it to an enum called “PhysicalSurface” or something similar.

Did that… And the hit I get is actor: ‘landscape’ and material: “default material”. The material is painted on the landscape layer. I also created a parameter node iReturnPhysicalMaterial’ set to true in the material blueprint, but I cannot attach it to anything in the material graph, and cannot find where to attach it to a material instance.