
void AJamPlayerController::Look(const FInputActionValue& Value)
{
// input is a Vector2D
FVector2D LookAxisVector = Value.Get<FVector2D>();
float ScaledBaseTurnRate = BaseTurnRate * GetWorld()->GetDeltaSeconds();
PlayerPawn->AddControllerYawInput(LookAxisVector.X * ScaledBaseTurnRate);
PlayerPawn->AddControllerPitchInput(LookAxisVector.Y * ScaledBaseTurnRate * (InvertY ? -1.0f : 1.0f));
}
I’ve been using this to adjust camera sensitivity at runtime for quite some time. However at high sensitivities, it gets really chunky and choppy. This is not ideal. I’ve added a spring arm component to try to add some rotational lag but that didn’t work, and it seems like a crappy workaround anyway. How else can I adjust mouse sensitivity at runtime? ChatGPT is a hallucinating mess when it comes to this, and all the other tutorials/topics seem to do it this way. But there has to be a better way! Any thoughts?