Detect Physical Material + Error in viewport | Footstep sounds

Hi guys,
today I want to implement a more advanced First Person Character and added head bobbing. Now I wanted to add some sound to my character with sound variation. I’ve found a good video tutorial and everything worked out, but now I have problems with detecting the Phys Materials and some errors, when I end the viewport playback.

First of all I want to show you my blueprint:

The default sound works, but the others won’t … and I dont get a printed string. My thought was, something is missing to detect the Physical Material. In the Project Settings I set my Physical Surface, I created new Physical Materials and assigned them to the Standart Materials. I also assigned the Surface Type to the Phyiscal Material. This is the setup I need, right?

And this isn’t my only problem.
After end the Play mode, I get the following Error Message:

Blueprint Runtime Error: Accessed None trying to read property CallFunc_BreakHitResult_PhysMat from function: ‘ExecuteUbergraph_FPS_Controller’ from node: Switch on EPhysicalSurface in graph: EventGraph in object: FPS_Controller with description: Accessed None trying to read property CallFunc_BreakHitResult_PhysMat

In case the full blueprint is necessary: FullFPS Controller posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4

To be honest - I understand there is a connection missing, but I dont know how to fix it.

Thanks for your help :slight_smile:

Your trace length seems very short, but I don’t know what your player is. Also, double-check the material you are using on your mesh or landscape is correct. Since you are using Character Movement, I might suggest a different solution (remember to click the “return material on move” in the capsule section).

It seems to me like your line trace goes 20 units up, not down. If so, you’re not getting a hit at all.

Also, 20 units might be too short anyway.

I’m also curious which trace channel you’re using, but again I’m pretty sure that in one way or another, your trace isn’t even hit anything.

I think that might explain your error message too (invalid phys mat in hit result).

Have your blueprint report the hit boolean to you and see what it’s saying.

Did you remember to apply your physical materials to the landscape layer files generated in the Landscape Paint tab?