Camera component only moving horizontally

I am trying to implement down sight aiming in the First Person Shooter template. After some refactoring, I ended up with a weapon actor and the player character.

The weapon actor has a down sight camera component and the player has the default camera component. Now I have been able to switch between cameras but the issue is that the down sight camera does not properly follow the controller rotation, in fact it only rotates horizontally while the player’s camera moves properly across axes.

Any idea what might be causing this issue will be greatly appreciated, thanks.

I have exactly the same code to switch cameras :slight_smile: ! I tried bUsePawnControlRotation = true; on the down sight camera but that did not change anything, I even tried to disable it with bUsePawnControlRotation = false; as well as setting the player’s camera **bUsePawnControlRotation ** to false when I switched to the down sight camera and vice versa, yet it appeared as if changing the value of that variable had no effect affect whatsoever.

Hey there, make sure that the weapon’s camera has the same settings as the player’s camera (Use Pawn control rotation, etc). To switch between cameras i just do:

PlayerController->SetViewTargetWithBlend(bIsAiming ? Weapon : this, 0.25f);

I found the answer here: FPS Game, SetViewWithBlend Camera Control

What worked for me was having in my Character Blueprint both “Use Controller Rotation Pitch” and “Use Controller Rotation Yaw” checked.