AddPitchInput not applying AxisValue

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

    TSubobjectPtr< UCameraComponent> MyCamera;

to

TSubobjectPtr<class UCameraComponent> MyCamera;

then, in the constructor, after the camera component is initialized, you have to set the bUsePawnControlRotation property to true like so:

AddComponent(FName("UCameraComponent"), true, FTransform(FVector()), MyCamera);
	MyCamera->bUsePawnControlRotation = true;

Not sure why this works, but hopefully this can be a quick fix for anyone who comes across the same problem.

<3