How to get a vector that's horizontal to another vector and is pointing in a specific direction?

Ok, so I’m trying to get a vector horizontal to the ground that my character is standing on AND I want it to be pointing in the direction the character is looking.

I’m currently getting the right vector of the hit normal and setting the rotation of a scene component with it, and then getting the camera rotation and setting the rotation of the scene component again to the Z of the camera rotation, but this doesn’t keep horizontal to the ground.

I feel like there is a simple mathematical solution for this but I have never been able to figure it out.

Sounds like this:

Instead of 1, feed it ground normal. There’s a couple of those, serving specific purposes.

If that’s not it then I severely misunderstood the description.

I’m crying, it works wonderfully. Thank you.