Get Material of Hit component

I’m trying to check if the object you are touching has a cactus physical material to apply damage.
If I just knew how to connect “Other comp” to “Get physical Material” (see image). Help!

You need to break last node the Hit and the from it the phisical material


When I do this, the “Phys Mat” doesn’t have any output. I’ve added a “Print string” in between to check and it doesn’t print anything.

Because I am only touching/hitting a mesh. But then again how do I get the physical material from the “Hit Component” there?

from hit component you can get material but you need to know in what index is the cactus material set. Index is just the element number in material section for static mesh.

Aniway how you try to hit this mesh? by your visual using a trace line?

Thanks, works now! :slight_smile:

Pay attenction if you put your cactus material in other mesh that got this material in index != 0 it wont work.

PS: If someon help you remember to accept him answer like the correct 1.