Hit event doesn't give back Physical Material

Used clear TPS project also.

  1. Create new physical material.
  2. Override floor/wall physical material to the new one.
  3. On Event Hit call a PrintString to write out the physical material, or the result of a comparison. You will get None.

Hi CrimsonHawk,

Make sure to enable Return Material on Move on the collision/mesh of your projectile. This is all that is needed to get it working in the default FPS template.

Let me know if that works for you.

Cheers,

TJ

3 Likes

Hi!

It didn’t help. I try to use the CapsuleComponent of the ThirdPersonCharacter, with a wall(/floor) without success. The Hit event fires, but the material is still None. Here is how I set the wall’s options:

120999-0.png

1 Like

Ahh, you are right! Sorry for false alarm. It’s a bit strange logic for me that it has to be set on the player. I thought it has to be checked on the other surface who provides the material.
A little bit off topic: Is there any difference between using the Event Hit, and the OnVomponentHit(CapsuleComponent)?

Are you enabling ‘Return Material on Move’ on the Capsule Component of the character? I just did that and it’s working on my end.

And here is the BP setup I used.

1 Like

Just what you would think. The EventHit targets the entire actor and the OnComponentHit targets the specific component you specify.

You might want to use EventHit if the actor contains several components that can generate Hit/Overlap events and you want all of them to report back.

In the case of a character walking on different materials, the capsule is all you would really need.