Needs to happen in unreal.
Add a socket to your pelvis bone. Run a line trace starting from the socket location to -1000 z (one meter)
the hit result will give you the exact distance to the chair.
Push the value to the animBP and use it in a transform modify bone for Pelvis as is.
Invert the value (-) and apply with transform modify bone to foot_l / foot_r
Not sure if the rest of the bonechain (shin and thigh) will shift up by itself without a legIK node in there. Give that a try first. If it does not:
Change foot_r and foot_l to ik_foot_l and ik_foot_r and setup a leg ik node as the last before final pose in ABP.
As a result, any time you sit your character will automatically land perfectly on the surface.
This doesn’t deal with aligning.
To align you need to either set up the chair as a skeletal mesh, and give it a root that is where the character root has to be for sitting to happen.
you need to export the static mesh with an offset pivot point so you can align to the pivot the same way.
Or, you just set a set of parameters on the chair that tell the character where he has to be before interacting.
Usually you use this last one. Within chair BP you add an arrow, and use the arrow to place the root of the character / move the arrow to taste.