Making player head rotate to the direction the camera is facing

I want to rotate the player’s head to the direction the camera is facing. How can I take account for the forward vector when I rotate the head? I have tried “Rotation From X Vector” and other solutions, but I’m stuck.

These are the nodes in the animation blueprint:


This is how I want the head to rotate according to the direction the camera is facing:

This is what happens when the player is facing in the opposite direction. The head turns when it should look in the same direction as the camera:

Use an aim offset.

And camera forward vector normalized, broken, take y.

From that, the value is always in a 0 to 1 range.
So your AO can probably use 0 and 1 directly.
That’s assuming you want 180deg.

Neg numbers should be the back/opposite of what you need.

Its possible that the front is actually in a different range depending on what you get the forward vector of.
If it gives you - values on the left and positive to the right, just set your AO to -.5 .5 range - instead of doing math.
(You could add .5, and then always have a value from 0 to 1. But its a needless expense).

Also,
The abimation blueprint is not supposed to have any code.
Do everything from the characterBP.

1 Like

Thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.