I was following a shooter tutorial on Youtube. I use “Set View Target With Blend” node to switch gun sight camera. But when I do that my camera only rotates on Y axis. So I followed the tutorial and set the “FirstPersonCamera” rotation to controller rotation.
The question is, why can I only rotate on Y axis?
Note: I am created project with default FirstPersonShooter template.
Sounds like you haven’t quite grasped how the blend works.
You have two cameras, both in the positions you want them. The blend node just changes the viewpoint from one camera to the other. It doesn’t rotate cameras.
I know how it works and It doesn’t rotate cameras. “Add Yaw Input” node in the blueprint does it. But when I switch cameras I lose control of pitch but not yaw. I want to know why I can’t add pitch input.
Thanks for reply. I set the camera rotation to player controller and it worked. I confused why pitch doesn’t work but I got it. Like you said pitch effects camera, yaw effects main capsule that’s why. Again thanks for answer.
Yep, it does that. As soon as you blend to a camera that is not a character component, pitch doesn’t work anymore. Moreover, the character camera stops receiving pitch input as well. However, if you enable Use Controller Rotation Pitch in the Pawn settings, it does rotate; my guess is, when you blend to the new camera, the Player Controller stops working the entire character hierarchy and only affects the main capsule.
You can try enabling Use Controller Rotation Pitch when blending to a gun camera and disabling when blending back to the character camera, but you should keep in mind that it would rotate the capsule so you need to manually set its pitch back to 0 when blending back. However, capsule rotation engenders other issues like clipping and shifted pivot.