When you use a line trace you can “break the hit.” From there, you can get the Hit Normal, which will give you the “angle of the hit.” This can be used to calculate the pitch, roll, etc. You can also you the Impact Location to determine the distance (height) by simply doing this calculation:
Hit location - Leg location (tip of leg) -> Vector Length node. This will give you a Float that represents the distance between the 2 vectors.
Vector 1 equals A minus B, and Vector 2 equals C minus B (each of these letters are the hit positions), then you can make a rotator using a Make Rot From X Y node, with Vector 1 and Vector 2 plugged into it.
Thanks, I’ve tried normals that does not work great, each leg is on it’s own bump or dent of the floor all at different heights. The three point method sounds like a better option and I will try what you explained, one thing how do I change the height when rotating is not enough.
thanks
edit: three point method works great thanks, I think I can come up with something to change the height when the legs go through the floor, but if any suggestions please do tell!