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!

1 Like

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

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.

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