This system creates three linetraces per finger that determine if the fingers can interact with the terrain around it.
Here's a video of what it looks like: https://www.youtube.com/watch?v=OogOw5lfDuE
This is a very basic and unrefined system, but it's very performance friendly. Feel free to take a look and adapt it for any purpose. I put a article on Gamasutra which has a detailed discription on how it works: http://gamasutra.com/blogs/TomKemna/20190124/335112/Inverse_kinematics_for_fingers_explanation_and_example_in_Unreal_Engine_421.php