AddPitchInput not applying AxisValue
So I have a player controller coded in C++ and everything was working just fine until I updated to version 4.5.1. now all character actors using this controller class have all movement input working except for pitch. The roll (keyboard A and D), moveforward (keyboard W and S) and yaw (Mouse Axis X) work just fine, but the pitch input will not change the camera pitch. i have made sure that the camera component bUseControllerViewRotation is true, removed and readded the LookUp axis value in the input section of the editor as well as from the code itself, removed all slate widgets from the HUD class and confirmed that the delegate bound to my character's LookUp function executes at least to the "AddControllerPitchInput(axisValue);"
I can make absolutely no sense of this, as the Yaw works just fine and all of the documentation seems to indicate that if one should fail, so should the other.
Two possible culprits: 1) my serialized settings class has an "Invert Y axis" setting, but I have run this in editor with a value set and it still does the same thing.
2) my game mode switches between 3 different HUD classes depending on the type of character. but on top of having no idea how this would only cancel out the Y axis input, this setup was working fine in 4.4.3.
so i'm just gonna throw this out there.
Does anyone have any ideas what could cause this?
asked Nov 05 '14 at 06:46 PM in C++ Programming
After tearing apart my entire project, i found that for some reason, the two following changes need to be made for the Y axis to function properly:
1) in the header file, the camera component needs to be changed from
then, in the constructor, after the camera component is initialized, you have to set the bUsePawnControlRotation property to true like so:
Not sure why this works, but hopefully this can be a quick fix for anyone who comes across the same problem.
answered Nov 08 '14 at 05:52 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here