how i can align my pawn character up vector to impact normal for any Surface by blueprint ?
It took a good bit of experimentation, but I think I have a solution for you. I will post my code and then explain it below.
Explanation: Take your Normal vector and plug it into the "RotationFromXVector" node to convert it to a Rotator(the editor will do this step for you whenever you plug a vector into a Rotator input). From here you can rotate that value by 90 degrees because your up vector is always above your pawn. Finally you plug that value into the "Set Actor Rotation" node.
I know this is a really rough explanation, so I included some code below to allow you to draw the up vector of your pawn for debugging purposes.
Show the Up Vector Code:
I hope this answer helps,
answered Jul 22 '15 at 01:24 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here