Help with calculating directional weapon blocking when next to a wall/object

Been trying to figure out this for a day or so and I’m not quite 100% experienced with math nodes. I have been experimenting with it and trying to find similar things online but I can’t seem to figure it out.

Basically, when my fps character goes against a wall and my gun sphere trace hits and looks at a certain direction (left or right), it creates a procedural blocking with the modify bone anim node but the problem is (you can see in the vid) that it only does it on 1 axis. If possible, I would like it to be any surface normals with how the first wall i block with.

Or even just get a local direction of what side the sphere trace is hitting on a surface. I’ve just been following the AGR tuts and experimenting with a couple things. Any help is appreciated.