0
\$\begingroup\$

I want to limit the pitch of the Player camera, which is connected to the spring arm attached to the player capsule. spring arm I want to do this in C++ rather than Blueprints.

Does anyone know how to implement this in C++ for the Unreal Engines?

\$\endgroup\$
1
  • \$\begingroup\$ Could you edit your question and add the actual blueprint(s) you're referring to, rather than just including an external link, which may expire? \$\endgroup\$
    – liggiorgio
    Commented Nov 2, 2022 at 11:54

1 Answer 1

0
\$\begingroup\$

I rephrased my question in several ways and came up with a solution which I would lie to share.

In BeginPlay of the PlayerController add the code below.

APlayerController* ShooterPlayerController = Cast<APlayerController>( Controller );
if ( ShooterPlayerController )
{
    if ( ShooterPlayerController->PlayerCameraManager )
    {
        ShooterPlayerController->PlayerCameraManager->ViewPitchMin = -45.0;
        ShooterPlayerController->PlayerCameraManager->ViewPitchMax = 45.0;
    }
}
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .