Unreal Engine 5 · Blueprint → C++
Add Controller Yaw and Pitch Input in UE5 C++UE Docs
The Add Controller Yaw Input and Add Controller Pitch Input Blueprint nodes map to APawn::AddControllerYawInput(Val) and APawn::AddControllerPitchInput(Val) in Unreal Engine 5 C++ for look/aim rotation.
Blueprint node & C++ equivalent
AddControllerYawInput(LookAxis.X);
AddControllerPitchInput(LookAxis.Y);What do these nodes do?
These nodes rotate the controller's view by adding to its yaw (left/right) and pitch (up/down). They feed into the pawn's controller rotation, which a spring arm or camera typically follows. They are the standard way to implement mouse look or right-stick aiming.
In the example, LookAxis.X drives yaw and LookAxis.Y drives pitch from a 2D look input value.
The C++ equivalent
Call AddControllerYawInput(float Val) and AddControllerPitchInput(float Val) on the pawn. Both are declared on APawn, so characters and custom pawns inherit them. Each value is scaled by input sensitivity and applied to the controller's control rotation.
Bind them to your look input so horizontal movement adjusts yaw and vertical movement adjusts pitch.
Common mistakes
A common issue is inverted vertical look. Because pitch increases downward in some setups, you may need to negate LookAxis.Y to match player expectations. Another pitfall is calling these on a pawn that is not currently possessed by a controller, in which case there is no control rotation to modify.
Frequently asked questions
What is the C++ function for Add Controller Yaw Input?+
It is APawn::AddControllerYawInput(float Val). It adds the scaled value to the controller's yaw rotation.
How do I do mouse look in UE5 C++?+
Bind your look input to AddControllerYawInput for horizontal motion and AddControllerPitchInput for vertical motion on the pawn.