Stop walking into walls?

I haven’t been able to find a simple way to stop movement animations when I walk into a wall (using basic third person movement), and resume when walking away. On capsule component hit, I’ve tried a line trace for world static object, but I can’t seem to get the logic right.

Try using these nodes in this fashion

348950-screenshot-2021-09-18-112615.png