How do I translate normals X, Y & Z data into character rotation?

Hello,

I am trying to rotate my 3rd Person player/character so that he is aligned with the ground (example: if walking up a 45 degree hill, my player/character should be rotated 45 degrees). So far, I have been able to create a line trace that picks up X, Y & Z normal data below my player/character’s feet, but when I convert that data into rotation my player/character’s movement gets all messed up…

The following YouTube link shows my Player/Character’s movement WITHOUT my blueprint modifications (forward, back, left & right works properly).

The next YouTube link shows my Player/Character’s movement WITH my blueprint modifications (forward, back, left & right DOES NOT work properly).

Below is the rotation BP that I am using in my “MyCharacter”'s blueprint.

I have been searching the web and trying different things with my BP for about a month now and, well, I have not been able to figure this one out.

If anyone knows how to accomplish this (character rotation without breaking movement), please let me know. Any info would be appreciated =)

Thank you,

DuhCent

Hi

Use only pitch component from rotator converted from normal and combine with old Actor Rotation, you should not use yaw I believe. And forgot about roll, the roll component is always 0 after conversion Vector → Rotator.

Regards

Pierdek

Hello Pierdek! Thank you for helping out! I tried out your suggestion concerning the Pitch, Yaw & Roll and while my players movement is working properly now I am still having some trouble with my rotation (it seems like my character is rotating the wrong direction when walking on a angled surface).

The following YouTube video shows my new rotation (seems to lean left as opposed to back when walking up a hill):

Below is the updated rotation BP from “MyCharacter” BP.

I tried messing around with the pitch, yaw and roll from both the normal rotation and “get actor rotation”, but still cant get my character to rotate and move properly.

looking at my BP, can you see what I am doing wrong?

DuhCent

Hello. Just wanted to update this post to say that I am still struggling with this. Am I going about this the wrong way? Should I use actor BP’s to change character rotation & forward, right and up vectors instead of rotating off of normal data?

Duhcent