Download

Third Person Camera character head bone look at cursor

I’m looking for a way to control the head of my third person character using the mouse, so where ever the mouse is looking at, the character looks at while maintaining its original orientation.

I’ve looked around and all the tutorials I’ve looked at is where the mouse controls the entire character, but I’m looking to rotate just the head bone “Biped001Head”
I would like to put a limiter on this since I don’t want my characters neck to break when I move the mouse camera behind to look behind the character. (Maybe 60 degrees left and right)

Finally I would like to add in a delay system so when the mouse moves, the head waits a little and then turns to follow the mouse.

At the moment all I’ve found is a node in the AnimGraph called “Transform (Modify) Bone” where I can control rotation…well it definitely looks like it , but I don’t know where to go from there

UE4 is a great engine!
and I’m alone using this

I decided to give it a go with what I had.
I was able to figure out how to control the bone with the mouse but the turning is bonkers.
When the character is facing forward, the mouse works fine, but whenever im on the threshold of the mouse boundaries
(mouse is on the right side of the screen moving to the left)
the head just snaps without any blending

adasdsdwq2.jpg

When I turn the character to face the other way, the turning goes inverted so I was able to make some small progress but missed out on something crucial

4476d57a65e193041a3a5ddc80c014636694b0fc.png
29260375527a0e78cdfb00bf6f3c74874e5f7ba3.png

Help is appreciated,
thank you

I think using an aimoffset would be better than trying to control the individual bone. Aimoffset is used in the animation content example to make the controllable pawn aim where the camera is looking, but you could make reference animations with just the head moving instead of the entire body and then use a layered blend per bone with the neck as the beginning of the blend.

Use interpolation to smooth out movements, the node is called rinterp to. Get delta time from your event update animation, read the current value of the rotation, the new calculated value of the rotation should be the target and then set the return value as the current value. The example below is for getting where the third person camera is looking and limiting the angle to between -90 and 90 so that it can be used with an aimoffset asset.

000210086413f5fcb267eac8d438c9aeae43a9da.jpeg

Thanks, heaps, I didn’t think of it cause i was so narrow minded, but animsets do sound more promising.
I’ll give it a go and post my progress!
Thanks