Tilting character to surface. Lost in vector math. help please

i know this was written a while ago, but this was exactly the solution i needed for my problem so thank you!