Hitbox along sloped Surface / Ground (Wildstar)

Hi guys,
I’ve been thinking about how to handle this problem. In my third person game, I want the player to be able to aim on two axis, forward and right (not up/down). I’m using hitboxes for the attacks.

Now a problem arises: I want the player to be able to shoot up or down slopes, without having to aim up/down. The hitbox needs to adapt to the ground.
I’ve created a fine piece of art presenting the problem:

The red box is the hitbox. Brown is the ground and black is the player character.
The attack hitbox must conform to the ground, and the hitbox needs to be a single object, not multiples in a row if possible.

How would I tackle this? I think another game that uses a similar system is Wildstar. I’d love to know how they did their system, or at least how I could tackle this problem. Decals kinda behave like I want but I don’t think they can be used for attack hitboxes.
Any tips?

Thanks for your time and help guys!