AActor::HasActivePawnControlCameraComponent
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtualconst
Description
Returns true if this actor owns an active camera component that is set to use pawn control rotation (bUsePawnControlRotation=true), indicating an HMD-locked or controller-yawed camera setup.
Caveats & Gotchas
- • This checks for bUsePawnControlRotation on the UCameraComponent, not on a USpringArmComponent. A spring arm set to use pawn control rotation does not satisfy this test if the camera itself has bUsePawnControlRotation=false.
- • The player controller uses this to decide whether to replicate the control rotation to the camera — returning true from a custom override can affect remote-view smoothness on multiplayer games.
Signature
virtual bool HasActivePawnControlCameraComponent() const Return Type
bool Example
Detect first-person camera setup C++
if (MyPawn->HasActivePawnControlCameraComponent())
{
// First-person or HMD-driven camera; skip independent camera rotation
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?