How to get actual SurfaceType from Material ? Why it's return "mat_default" everytime for any entity on the level?

Hi there! I need get surface type from material. How to do so?

I already tried this

CODE

but without any luck( it’s just return me “mat_default” when It’s should return me “mat_drone” when I hitted my Drone Slice.

I made well setup for material and Drone’s mesh.

I find this code in PrimitiveColliderComponent.cpp


// configure pe_geomparams
pe_geomparams geometryParameters;
geometryParameters.flags = geom_collides | geom_floats | geom_colltype_ray;
// set surface type
if (!m_configuration.m_surfaceTypeName.empty())
{
if (ISurfaceType* surfaceType = GetSurfaceTypeManager()->GetSurfaceTypeByName(m_configuration.m_surfaceTypeName.c_str()))
{
geometryParameters.surface_idx = surfaceType->GetId();
}
}

but it’s for standard primitive colliders

I think need do something similar for MeshColliderComponent ?
to get actual surfacetype from it

well, I think I’m invent some kinda workaround to get surfacetype

just few pictures about this…