On Hit - Physical Materials?

I’m very new to Unreal, and I’m trying to understand how the ray projection system works in regard to accessing information about which area of an object is struck by a bullet or such.

It looks like we can easily determine which component of an actor was struck, but I’m wondering if there is any way to custom-define different areas of an actor or component. For example, if we had a bench made of metal and wood which used a single component and single render material. Is there any way to separate the wood from the metal beyond creating two separate static mesh components?

In my own custom engine (back in the good old days), I simply defined two collision meshes in these situations, where one was defined to represent wood and the other metal. This allowed the object to be quickly rendered while still being able to define physical material skin in a separate process. Is something like this possible? Maybe some way to detect which convex object was struck (would also need some ability to define a custom tag in convex shapes).

I’m just looking for any general information that would help in this area.

Thanks for any assistance!

You can add a physical material profile to the material itself so that it may return metal or wood depending on what was hit.
it’s a little more accurate then different collisions would be since collisions are usually supposed to be sloppily defined and not have many verticis, however it is also true that one may not be able to actually hit the material if the simple collision IS sloppy and prevents contact.

I believe you can set the pysical material in 2 different areas, one being the mesh LOD parameters for the material (or somewhere in the actual mesh) and one being within the actual material.

Depending on how you set up the object, the collision, and the projectile collision, you can more or less easily figure out what was hit and take different actions.

The most common thing you will find explained to help with this is footstep sounds rather than projectile hits.

You can easily take what you learn about the surface hit result and convert it for use in an object - though some learning and testing for the material and object/ucx design will definitely be involved.

A maybe slightly more important result from any line trace is the Normal Impact, which you won’t find covered by the footstep stuff.

Either way, to start, create a line trace, break the hit result (right click the pin, select break result) and see all the possible values you can play with should the trace return a true hit.

What you are trying to do may only work well with settings such as Use complex collision as simple on the mesh.
I do not reccomend using this setting everywhere for memory/performance sake.

The way to pull out the material is from the Hit Component pin, get the Material from collision Face Index.

to pull out the physical material you should have a specific pin since a few versions ago (but the projectile needs the checkbox checked to return it in the results).