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

I did exactly as u said.