Hello,
I would like to change the rotation of an actor (here a pawn) depending on the impact normal from line trace. It works for a climb but not for a descent because the impact normal is always positive. Someone has an idea to fix that ?
ok, I found a solution…
Could you share your solution please? I’m having the same problem!
There is a slightly cleaner way to solve this issue. My answer is a few years late, but found this on a Google search, so leaving a response for people finding this in the future.
Grab the impact normal from your hit result and pass it as the forward vector on a MakeRotationFromAxis node (leave the other two vectors at zero. Apply the resulting rotation to whichever actor you want to match the surface of your hit object.
You seem to be making a rotator from the impact normal, then making it a vector only to make a rotator again. I’m working on a slightly similar problem but it’s on the X axis of a wall.
I’m turning my character to face the same direction as the back-end of the wall he’s about to vault.
Now I don’t know if you would need to invert the vector like I did in your case. But my works okay so far.