issue matching character to angle of terrain ?

I’m trying to make a dead character match the surface angle of the terrain… and lerp smoothly to it… not just snap the character’s transform…
seems like it would be a no-brainer… but not so.

Getting the terrain surface normal, and lerping the character transform’s up vector to match, does indeed work… but it tends to rotate the character around ,so they all face the same direction, rather than leaving the character facing forwards… (probably to do with unity’s orthonormalize order ?)
e.g. character dies facing north, east or west… but by the end of the lerp, it rotates all characters to face south.

instead I tried getting the quaturnion to rotate the transform from the player’s current up vector to the surface normal vector… this also works… but it sometimes decides to flip the character the wrong way, almost through 360 degrees, to get to the correct final location.
eg, character starts off 15 degrees off correct… but instead of rotating 15 degrees… the quat decides to rotate the character (360-15) degrees

So both methods work… they just have ugly or undesired side effects.

any ideas ?
thanks

Have you looked into the ragdoll effects? Create a duplicate of the character (player or enemy character), set up ragdoll physics on it, create a prefab out of the ragdoll model, and in your code where the character dies, instantiate the ragdoll prefab at the character’s transform location and rotation, and Destroy() the original model. The ragdoll physics will automatically fall across whatever terrain/objects are around it in a very (morbidly) pleasing way. I love the effect! Especially if you add a force to it so it flails and tumbles away convincingly as if hit by a massive force…

Anyway. Look into ragdoll physics - you’ll really dig it! And it’s VERY simple to set up!