How to align a sprite to a slope without using fixed angle?

Hello Unity Community!

The title is a bit weird, I know. Here’s what I’m trying to achieve:

alt text

I want my sprite to angle itself when I go up a slope, like shown in the screenshot. However, disabling fixed angle will mess up my movement, because the character will spin in an undesirable way. The only solution I’ve come up with so far, is detecting when the character collides with a slope and rotating it, but I have the feeling there should be a better way. Can the physics engine handle this for me?

Thank you for your time!

You can raycast down your character and rotate the player in the direction of the normal of the hit point