Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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'?
    Last edited by Gryfalcon; 08-13-2019, 08:08 PM.

    #2
    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...
    Last edited by Gryfalcon; 08-14-2019, 03:40 PM.

    Comment


      #3
      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."
      Follow Unreal Dev Grant winner KINETIK's prgress on our YouTube Channel or FB page

      Comment


        #4
        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.

        Comment


          #5
          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.
          Follow Unreal Dev Grant winner KINETIK's prgress on our YouTube Channel or FB page

          Comment


            #6
            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.
            Last edited by Gryfalcon; 08-16-2019, 06:45 PM.

            Comment

            Working...
            X