How to rotate a body normally

I need the character’s body to be tilted towards where the normal is facing, I do this

BodyTilt = Quaternion.FromToRotation(Vector3.up, RayHit.normal);


Animator_T.rotation = Quaternion.Slerp(Animator_T.rotation, AnimatorRotation * BodyTilt, RotationSmooth);

AnimatorRotation rotates only along the Y axis, that is, the character simply turns, and BodyTilt is intended for tilting, but this does not work as it should, I show in the screenshots what is wrong.

How to direct it correctly?



    Quaternion BodyTilt=Quaternion.LookRotation(transform.forward, RayHit.normal);
    Animator_T.rotation = Quaternion.Slerp(Animator_T.rotation, BodyTilt,RotationSmooth);

Humans don’t rotate when standing on hillsides. We stay upright and adjust our legs and feet.

I did it, but it’s not quite what I wanted… Tell me the material where it is indicated how others do tilts so that it doesn’t look like in the video…

https://www.youtube.com/watch?v=lgTKCiRMXYk

did it this way

float tiltAngle = -Mathf.Atan2(point2.y - point1.y, Vector3.Distance(point1, point2)) * Mathf.Rad2Deg;
BodyTilt = Quaternion.Euler(tiltAngle, 0f, 0f);

Animator_T.rotation = Quaternion.Slerp(Animator_T.rotation, AnimatorRotation * BodyTilt, RotationSmooth);

now what I need is now it turns normally and only tilts back and forth when going up or down…

point1 - current position, point2 - next position