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
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
Help is appreciated,
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.
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!