Projectile collision physical material

I have an assault rifle that I use a line trace to determine where it hits. It gets me the correct physical material to make the correct impact hit.

I also have a crossbow that files projectile bolts. I’m using the event hit to apply damage. It has a hit result, but the hit result doesn’t have the physical material. Any suggestions on how to get the physical material that I just hit?

So I’ve noticed the hit result is blank in the event hit. I can’t use the actor reference because I won’t know which of the materials it actually hit.

It may be hitting the collision capsule on the character. Make sure the projectile ignores the collision channel that the collision component uses.

No I already solved that issue.
This is a different issue. Lets say it hits BSP, the other actor in the hit is the BSP actor. The material is blank. In another question someone suggested I use a short line trace on the event tick then save the material if it hits until its replaced or it hits.

Hi. I’m using editor version 4.9 and having the same problem - no physical material on projectile hit. How to solve this problem?

I use a short line trace on the event
tick then save the material if it hits
until its replaced or it hits

What does this mean? Trace from where to where?


Same problem here on 4.9. Why I can’t get the Physical Material on a projectile hit?
I can get the physics material only with simulated physics enabled.

From the current position of the projectile to its forward vector + some distance (not very long). If it hits anything you can save it. At some point the projectile will hit and you can use the last saved material hit. At least in theory. I haven’t tried it yet.

But why so complicated? There’s already a Hit event and it returns a HitResult. I think the returning data has to be fixed.

I certainly agree! The work around hasn’t been a high priority. That’s the only reason I haven’t tried it yet.

This system won’t work well, because the instant hit is faster than the projectile, so it can happen that the projectile hits the player and the instant hit doesn’t or viceversa.

I’m facing the same issue; The FHitRestult from OnBeginOverlap doesn’t return a physical material, and it seems you can’t get the physical material of a collider without a trace.
Have you managed to find a solution to this ?

Keep reading. I BELIEVE we posted a viable workaround below. Its still broken though. I haven’t bothered to include the workaround in my game since its in such an early stage and there are a lot more important things going on.

Basically the workaround is to use a line trace on the event tick. Store its results and return that. Like I said, not a huge priority, but even in UE4.10 it still returns errors after testing game play.

@awilliams1701, you can check phycisal material when your projectile bounce (or hit) the obstacle.
In hit result you have Hit Location vec3 and Hit Normal vec3, using this you can trace to get material

Make sure to enable Return Material on Move on the collision/mesh of your projectile.