Announcement

Collapse
No announcement yet.

Change FPS Mouse Sensitivity

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Change FPS Mouse Sensitivity

    How can I change the FPS camera sensitivity to look around in C++? Or is this not something to do in C++?

    #2
    You can scale the value from your controller input when adding it in your pawn/character. You can do this in Blueprint or C++.
    In C++ it may look something like this:
    (but the same functions are available in Blueprint)

    Code:
    //.h
    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    float MouseSensitivity = 0.5f;
    
    // .cpp
    void APawn::PitchView(float Val)
    {
       AddControllerPitchInput(Val * MouseSensitivity);
    }
    
    void APawn::TurnView(float Val)
    {
       AddControllerYawInput(Val * MouseSensitivity);
    }

    Comment

    Working...
    X