Why can't I rotate the camera on it Y-axis? (Pitch)

I’m trying to create a first-person controller where the mouse on the X-axis (Yaw) rotates the player (BP_Player) around the Z-axis, while the mouse Y-axis (Pitch) rotates the camera (MainCamera) around its Y-axis. The part that rotates the player works fine, but somehow I can’t change the rotation of the camera. I’m new, so please be patient.

Hello, welcome to the forum!

Since your camera is already set to use the pawns control rotation, you don’t need to handle any rotator logic yourself.

You are using Add Controller Yaw Input perfectly fine, but there is also the Add Controller Pitch Input function, which should be what you want .

Both methods do pretty much the same, one adds yaw input, the other pitch.

So like this? But how dose it know which one is the camera and which one is the body?

es

When you open the class defaults of your character, and search for “Controller Rotation” you will find 3 booleans.
Use Controller Rotation Pitch/Yaw/Roll.

These options define whether the character itself should inherit each of the control rotation components.

Most likely “Use Controller Rotation Yaw” is already set to true in your character blueprint.
Which would be the reason why “Add Controller Yaw Input” makes the character rotate on the yaw axis.

1 Like