Character position on slopes?

Hello everyone,

So I am using a character controller for a 2D platforming game. When the character moves on the slope his orientation is wierd but that is due to the capsule collider. Attached is an image for an example.

How do I make it look natural, by having the legs bend or maybe fix the rotation. I also heard that you cant rotate the character controller collider so that maybe not be a very good idea.

Any help is appreciated.

Thank you very much.

You’re going to need to animate the character with an “up slope” animation, and a “down slope” animation, each assuming “maximum slope”. Then you’ll need to add those clips to your mecanim animator, and blend between them and your regular running animation based on some kind of slope variable (perhaps change in Y / change in X, updated each frame?)

Good luck!