Add impulse to character in direction of movement input

I have implemented a “roll” input action for my third-person character. When pressed, she should perform a roll animation and get launched in the direction the player is inputting with velocity determined by some scalar value.

I have tried various setups for this so far, but none of my guesswork seems to be working quite right. The closest I’ve gotten is the setup below, making a vector out of the “Move Forward” and “Move Right” axis values, setting rotation based on that, and then adding an impulse from the forward vector, like so:

This setup almost works perfectly, but with one issue. If I rotate my camera 180 degrees about the X axis, all of the impulses seemingly become reversed. In other words, after spawning, if I hold forward (W) and press roll, I roll forward. If I face the character towards the camera and hold backwards (S), she rolls towards the camera, as expected. But if after spawning I were to rotate the camera 180 degrees about the X axis (so now I am looking at the character’s front), press (W) so she faces forward, and then press roll + (W), she is not launched forwards, but backwards, and vice versa. So it seems to change depending on which direction the character is facing in the world, rather than just which inputs I’m pressing.

Does anyone know how I can remedy this or what I am missing? I hope I explained well enough, please let me know if clarification is needed.

Edit: Better solution that takes camera pitch into account.

On the off chance that this helps someone in the future, I did find a solution. It may or may not be an elegant solution, but it does the job!

What I changed was to get the rotation of a Spring Arm Component connected to a socket on the front of my character’s camera that extends towards her pelvis. Using that (and ignoring pitch so that she doesn’t move into the air if the camera is aimed upwards or move towards the ground if pointed downwards) I can roll in any direction I want based on the player’s input, like so:

The branch before this code is checking whether the MoveForward and MoveRight axis values are both 0, because if not, then I use different scalar values for the Forward and Right vectors. Otherwise, when I press a combination of forward/back and left/right, the added vectors cause my roll speed to be much higher than holding only forward/back or left/right.

If anyone knows of a cleaner way to express this same logic, I’m still open to that. Otherwise, I’m just glad it’s finally working as intended!