Control Rig Backwards solving for sliders

I Have my fingers on this control rig controlled by sliders.

Im currently trying to backwards solve the control rig so I can bake any animation I want onto this rig for adjustments. My current thought process has me taking each piece of the finger bones associated with a slider, getting their transform, checking an angle between them, converting that angle to a float, clamping that float between 0-10 and setting my weight on the ctrl rig slider. Problem is Idk how to achieve this, and the resources on relevant radial base functions are both minimal and confusing for someone with a high school level of calculus, doubly so for using the rbf nodes in unreal.

So how do I convert these bone rotations to slide this slider along an axis? any help or resources are appreciated.

If it helps this is how Im controlling the fingers on the forward solve

Hello, I have the same problem. Have you found a solution ?