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"

Mouse input doesn't work

I've begun, to set the input in code. The WASD and Space Bar works, but the mouse doesn't work. I cannot turn the character, not even aim or fire. I wrote: InputComponent->BindAxis("Turn", this, &AMyCharacterClass::AddControllerYawInput);. I made the same in blueprint, but it's the same. What should I change? Thanks!

Product Version: Not Selected
more ▼

asked Oct 28 '14 at 01:17 PM in C++ Programming

avatar image

61 15 15 20

avatar image Dune Oct 28 '14 at 01:38 PM

Does your DefaultInput (Found in ProjectName->Config->DefaultInput) file contain: +AxisMappings=(AxisName="Turn",Key=MouseX,Scale=1.000000)

This can also be set in the Editor through Project Settings-> Input

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

2 answers: sort voted first

I think this works, but you cannot see any effects. First check if your controller rotates. Run game, hit ~ and type "DisplayAll PlayerController Rotation". Value should be displayed on the top of a screen as a text line, then move mouse to check if it changes. If this works, make sure that your character/camera boom/camera have bUsePawnControlRotation flag set. You should also set this flags: bUseControllerRotationPitch, bUseControllerRotationYaw, bUseControllerRotationRoll. Marcin

more ▼

answered Oct 28 '14 at 01:39 PM

avatar image

578 23 15 48

avatar image GSeriousB Oct 28 '14 at 05:49 PM

Thanks! I've changed the ControllerRotation settings, and now I've forgot to set it back. Thank You!

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

Check on the Project Settings -> Input on Axis Mapping if you have Turn mapped to Mouse X. If you do, put a breakpoint on the AddControllerYawInput to see if it triggers. If it does, there should be something wrong with you logic in that function.

more ▼

answered Oct 28 '14 at 01:40 PM

avatar image

6k 163 129 305

(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