How to align decal with socket rotation?

Hi!

I’m trying to spawn footstep decals under my characters feet. I’m having trouble aligning the rotation for the right foot, the left works fine. I’m using metahumans and I’m getting the scoket rotation of left and right foot to determine decal rotation.

Thank you for taking the time to read.

Logic for left foot:

Logic for right foot:

Decal spawn node:
image

For days i had t his problem, and I am proud to present you with the solution. I couldn’t find it anywhere so I wrote it myself.

happy days.