CharacterController: normal.hit

Hi!

I’d have some sea crabs in my game. When they walk on a wall, I’d like to rotate them so that they are “stuck” on slopes (they should rotate).
How can I rotate the character correctly based on a normal?

function OnControllerColliderHit (hit : ControllerColliderHit) {
	var nrm = hit.normal;
	// and now rotate the transform.... how? 
	}

THANKS!

Terribly sorry, but close after posting this I finally figured it out.

transform.rotation = Quaternion.FromToRotation(Vector3.up, normal);