How do I reset controller yaw and pitch?

I’m making a TP FP switch similar to Skyrim, but when I got back to FP the camera lerps using a timeline to the position and rotation of an ArrowComponent which is parented to the Root, and the camera gets parented to this arrow. The only difference from TP movement is that it directly gets the control rotation instead of dividing it up. Same mouse controls, only one change in the camera settings.

So it works and it rotates the camera to the same rotation of that arrow, but it seems to “pop” into the rotation of the controller, so if you move the camera while the blending happens you get the popping. What is the best way to get the rotation of the control yaw and pitch or how to reset it/lock it for one second?

Or better how would you make sure the camera gets blended and attached correctly so it don’t pop after the camera blend anim has been performed which takes 1 second for now?

Right now I’m doing this when you switch from and to FP:

And here is the blend animations plus some extra:

Hello!

When I doubt: branch. Coming from C# (where I usually had 90% of my scripts be if-statements), didn’t take long before I realized their power.

Attach all your camera controls so, that you have variable “lockRot”, and if its 0, condition of those branches from input is checked, and the signal can pass through adjusting the camera.

Hope this helps, -DoctorPC

Oh icic, well I did it another way that I think worked better than resetting the yaw and pitch.

So what I did instead was to get the control rotation and lerp to that rotation value and at the same time rotate the character capsule only in yaw to wards the same rotation. making a smooth transition in the direction the camera is facing in third person. No popping, or turning, it faces the same way during the transition ^^

I’m doing it this way because after one second standing still, the person can turn the camera around the character without the character following. So if I turned the camera to look at his face and go into First Person, he will turn around 180 degrees to face the same way.

nice! :slight_smile: Hope your project proceed nicely.