x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: Not Selected
Tags:
more ▼

asked Nov 05 '14 at 06:46 PM in C++ Programming

avatar image

CUTIEPIE
61 7 7 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

more ▼

answered Nov 08 '14 at 05:52 PM

avatar image

CUTIEPIE
61 7 7 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question