How to get the surface type, and physical material with a projectile in C++?(No Linetraces)

I have done that and still for some reason the sphere comp doesn’t return a hit in cpp but in bp it works just fine. Thank you for the advice though.