Ninja Character - Dynamic gravity for characters & objects

Hi community! Have an issue dealing with more complex capsule rotation with the Ninja Character Plugin. Would greatly appreciate any input, it’s an amazing plugin and would really like to make it work.

I’m running some smooth capsule rotation logic on tick in my character blueprint. This logic looks like this:

My problem is calculating directions and rotations on angles (especially at 90 degrees). If I print string the normalized cross product for the the NinjaPlayerCharacter_BPs forward/backward movement input, at 90 degrees, X = 1 has turned into X = 0 and Z = 1 . Which basically tells me that the world up does not rotate according to the gravity changes from the plugin. Now, as I’ve learned from @Xaklse , “There is no yaw rotation in a world with arbitrary gravity, unless you use (1,0,0) vector as reference, or another one derived from camera rotation, control rotation, anything rotation… Same problem with pitch rotation and (0,0,1) vector”. How would I go about solving this rotation logic based on that answer? The closest solution I’ve found is this:

But it does not work so well. At 90 degrees the capsule will start to freak out and have a hard time understanding its orientation in space.

Thank you for reading and any input is greatly appreciated! Let me know if more information is needed.