| UObjectBase
|
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Camera/PlayerCameraManager.h |
Include |
#include "Camera/PlayerCameraManager.h" |
class APlayerCameraManager : public AActor
A PlayerCameraManager is responsible for managing the camera for a particular player. It defines the final view properties used by other systems (e.g. the renderer), meaning you can think of it as your virtual eyeball in the world. It can compute the final camera properties directly, or it can arbitrate/blend between other objects or actors that influence the camera (e.g. blending from one CameraActor to another).
The PlayerCameraManagers primary external responsibility is to reliably respond to various Get*() functions, such as GetCameraViewPoint. Most everything else is implementation detail and overrideable by user projects.
By default, a PlayerCameraManager maintains a "view target", which is the primary actor the camera is associated with. It can also apply various "post" effects to the final view state, such as camera animations, shakes, post-process effects or special effects such as dirt on the lens.
Name | Description | ||
---|---|---|---|
|
TObjectPtr< cla... |
AnimCameraActor |
|
|
uint32: 1 |
bAlwaysApplyModifiers |
By default camera modifiers are not applied to stock debug cameras (e.g. CameraStyle == "FreeCam"). |
|
uint32: 1 |
bAutoAnimateFade |
|
|
uint32: 1 |
bClientSimulatingViewTarget |
True if clients are handling setting their own viewtarget and the server should not replicate it. |
|
uint32: 1 |
bDebugClientSideCamera |
For debugging. |
|
uint32: 1 |
bDefaultConstrainAspectRatio |
True if black bars should be added if the destination view has a different aspect ratio (only used when a view target doesn't specify whether or not to constrain the aspect ratio; most of the time the value from a camera component is used instead) |
|
uint32: 1 |
bEnableColorScaleInterp |
True to smoothly interpolate color scale values when they change. |
|
uint32: 1 |
bEnableColorScaling |
True to turn on scaling of color channels in final image using ColorScale property. |
|
uint32: 1 |
bEnableFading |
True if we should apply FadeColor/FadeAmount to the screen. |
|
uint32: 1 |
bFadeAudio |
True to apply fading of audio alongside the video. |
|
uint32: 1 |
bGameCameraCutThisFrame |
True if we did a camera cut this frame. |
|
uint32: 1 |
bHoldFadeWhenFinished |
True if camera fade hold at it's final value when finished. |
|
uint32: 1 |
bIsOrthographic |
Flags. |
|
BlendParams |
Current view target transition blend parameters. |
|
|
float |
BlendTimeToGo |
Time remaining in viewtarget blend. |
|
uint32: 1 |
bShouldSendClientSideCameraUpdate |
If true, send a camera update to the server on next update. |
|
uint32: 1 |
bUseClientSideCameraUpdates |
True if server will use camera positions replicated from the client instead of calculating them locally. |
|
TObjectPtr< cla... |
CachedCameraShakeMod |
Camera Modifiers. |
|
CameraLensEffects |
"Lens" effects (e.g. blood, dirt on camera) |
|
|
CameraStyle |
Usable to define different camera behaviors. A few simple styles are implemented by default. |
|
|
FVector |
ColorScale |
Allows control over scaling individual color channels in the final image (when bEnableColorScaling == true). |
|
float |
ColorScaleInterpDuration |
Total time for color scale interpolation to complete (when bEnableColorScaling and bEnableColorScaleInterp == true) |
|
float |
ColorScaleInterpStartTime |
Time at which interpolation started (when bEnableColorScaling and bEnableColorScaleInterp == true) |
|
float |
DefaultAspectRatio |
Default aspect ratio. Most of the time the value from a camera component will be used instead. |
|
float |
DefaultFOV |
FOV to use by default. |
|
DefaultModifiers |
List of modifiers to create by default for this camera |
|
|
float |
DefaultOrthoWidth |
The default desired width (in world units) of the orthographic view (ignored in Perspective mode) |
|
FVector |
DesiredColorScale |
Desired color scale which ColorScale will interpolate to (when bEnableColorScaling and bEnableColorScaleInterp == true) |
|
FVector2D |
FadeAlpha |
Current camera fade alpha range, where X = starting alpha and Y = final alpha (when bEnableFading == true) |
|
float |
FadeAmount |
Amount of fading to apply (when bEnableFading == true). |
|
FadeColor |
Color to fade to (when bEnableFading == true). |
|
|
float |
FadeTime |
Total duration of the camera fade (when bEnableFading == true) |
|
float |
FadeTimeRemaining |
Time remaining in camera fade (when bEnableFading == true) |
|
float |
FreeCamDistance |
Distance to place free camera from view target (used in certain CameraStyles) |
|
FVector |
FreeCamOffset |
Offset to Z free camera position (used in certain CameraStyles) |
|
float |
LockedFOV |
Value to lock FOV to, in degrees. Ignored if <= 0, utilized if > 0. |
|
float |
LockedOrthoWidth |
Value OrthoWidth is locked at, if > 0. Ignored if <= 0. |
|
ModifierList |
List of active camera modifier instances that have a chance to update the final camera POV |
|
|
OnAudioFadeChangeEvent |
If bound, broadcast on fade start (with fade time) instead of manually altering audio device's primary volume directly |
|
|
FVector |
OriginalColorScale |
Color scale value at start of interpolation (when bEnableColorScaling and bEnableColorScaleInterp == true) |
|
TObjectPtr< cla... |
PCOwner |
PlayerController that owns this Camera actor |
|
PendingViewTarget |
Pending view target for blending |
|
|
TArray< struct ... |
PostProcessBlendCache |
Internal list of active post process effects. Parallel array to PostProcessBlendCacheWeights. |
|
TArray< EViewTa... |
PostProcessBlendCacheOrders |
Internal list of how to blend post process effects. |
|
TArray< float > |
PostProcessBlendCacheWeights |
Internal list of weights for active post process effects. Parallel array to PostProcessBlendCache. |
|
SwapPendingViewTargetWhenUsingClientSideCameraUpdatesTimerHandle |
||
|
float |
ViewPitchMax |
Maximum view pitch, in degrees. |
|
float |
ViewPitchMin |
Minimum view pitch, in degrees. |
|
float |
ViewRollMax |
Maximum view roll, in degrees. |
|
float |
ViewRollMin |
Minimum view roll, in degrees. |
|
ViewTarget |
Current ViewTarget |
|
|
FVector |
ViewTargetOffset |
Offset to view target (used in certain CameraStyles) |
|
float |
ViewYawMax |
Maximum view yaw, in degrees. |
|
float |
ViewYawMin |
Minimum view yaw, in degrees. |
Name | Description | |
---|---|---|
|
APlayerCameraManager ( |
Name | Description | |
---|---|---|
|
~APlayerCameraManager() |
Destructor for handling property deprecation, please remove after all deprecated properties are gone |
Name | Description | ||
---|---|---|---|
|
void |
AddCachedPPBlend ( |
Adds a postprocess effect at the given weight. |
|
AEmitterCame... |
AddCameraLensEffect |
|
|
bool |
AddCameraModifierToList ( |
|
|
TScriptInter... |
AddGenericCameraLensEffect ( |
Creates a camera lens effect of the given class on this camera. |
|
UCameraModif... |
AddNewCameraModifier ( |
Creates and initializes a new camera modifier of the specified class. |
|
bool |
AllowPhotographyMode() |
Whether or not we allow photography mode |
|
void |
ApplyAudioFade() |
|
|
void |
ApplyCameraModifiers ( |
Applies the current set of camera modifiers to the given camera POV. |
|
void |
AssignViewTarget ( |
|
|
BlendViewTargets ( |
Internal helper to blend two viewtargets. |
|
|
bool |
BlueprintUpdateCamera ( |
Blueprint hook to allow blueprints to override existing camera behavior or implement custom cameras. |
|
float |
CalcRadialShakeScale ( |
|
|
void |
CleanUpAnimCamera ( |
|
|
void |
ClearCachedPPBlends() |
Removes all postprocess effects. |
|
void |
ClearCameraLensEffects() |
Removes all camera lens effects. |
|
void |
DisplayDebug ( |
|
|
void |
DoUpdateCamera ( |
Internal function conditionally called from UpdateCamera to do the actual work of updating the camera. |
|
void |
FillCameraCache ( |
Caches given final POV info for efficient access from other game code. |
|
UCameraModif... |
FindCameraModifierByClass ( |
Returns camera modifier for this camera of the given class, if it exists. |
|
TScriptInter... |
FindGenericCameraLensEffect ( |
Camera Lens EffectsReturns first instance of a lens effect of the given class. |
|
void |
GetCachedPostProcessBlends ( |
Returns active post process info. |
|
void |
GetCachedPostProcessBlends ( |
Returns active post process info. |
|
float |
GetCameraCacheTime() |
Get value of CameraCachePrivate.Time |
|
const FMinim... |
GetCameraCacheView() |
Gets value of CameraCachePrivate.POV |
|
FVector |
GetCameraLocation() |
Returns camera's current location. |
|
FRotator |
GetCameraRotation() |
Returns camera's current rotation. |
|
void |
GetCameraViewPoint ( |
Primary function to retrieve Camera's actual view point. |
|
float |
GetFOVAngle() |
Returns the camera's current full FOV angle, in degrees. |
|
float |
GetLastFrameCameraCacheTime() |
Get value of LastFrameCameraCachePrivate.Time |
|
const FMinim... |
GetLastFrameCameraCacheView() |
Gets value of LastFrameCameraCachePrivate.POV |
|
float |
GetLockedFOV() |
|
|
float |
GetOrthoWidth() |
Returns the current orthographic width for the camera. |
|
APlayerContr... |
GetOwningPlayerController() |
Returns the PlayerController that owns this camera. |
|
USceneCompon... |
GetTransformComponent() |
Returns TransformComponent subobject |
|
AActor * |
GetViewTarget() |
Returns the current ViewTarget. |
|
APawn * |
GetViewTargetPawn() |
Returns the ViewTarget if it is an APawn, or nullptr otherwise |
|
void |
InitializeFor ( |
Initialize this PlayerCameraManager for the given associated PlayerController. |
|
bool |
IsOrthographic() |
Returns true if this camera is using an orthographic perspective. |
|
void |
LimitViewPitch ( |
Limit the player's view pitch. |
|
void |
LimitViewRoll ( |
Limit the player's view roll. |
|
void |
LimitViewYaw ( |
Limit the player's view yaw. |
|
APlayerCamer... |
OnBlendComplete() |
|
|
void |
OnPhotographyMultiPartCaptureEnd() |
Event triggered upon the end of a multi-part photograph capture, when manual free-roaming photographic camera control is about to be returned to the user. |
|
void |
OnPhotographyMultiPartCaptureStart() |
Event triggered upon the start of a multi-part photograph capture (i.e. a stereoscopic or 360-degree shot). |
|
void |
OnPhotographySessionEnd() |
Event triggered upon leaving Photography mode (after unpausing, if r.Photography.AutoPause is 1). |
|
void |
OnPhotographySessionStart() |
Event triggered upon entering Photography mode (before pausing, if r.Photography.AutoPause is 1). |
|
void |
PhotographyCameraModify ( |
Implementable blueprint hook to allow a PlayerCameraManager subclass to constrain or otherwise modify the camera during free-camera photography. |
|
void |
PlayWorldCameraShake ( |
Static. |
|
void |
ProcessViewRotation ( |
Called to give PlayerCameraManager a chance to adjust view rotation updates before they are applied. |
|
void |
RemoveCameraLensEffect ( |
|
|
bool |
RemoveCameraModifier ( |
Removes the given camera modifier from this camera (if it's on the camera in the first place) and discards it. |
|
void |
RemoveGenericCameraLensEffect ( |
Removes the given lens effect from the camera. |
|
void |
SetCameraCachePOV ( |
Sets value of CameraCachePrivate.POV |
|
void |
SetCameraCacheTime ( |
Get value of CameraCachePrivate.Time |
|
void |
SetDesiredColorScale ( |
Sets the new desired color scale, enables color scaling, and enables color scale interpolation. |
|
void |
SetFOV ( |
Locks the FOV to the given value. Unlock with UnlockFOV. |
|
void |
SetGameCameraCutThisFrame() |
Sets the bGameCameraCutThisFrame flag to true (indicating we did a camera cut this frame; useful for game code to call, e.g., when performing a teleport that should be seamless) |
|
void |
SetLastFrameCameraCachePOV ( |
Sets value of LastFrameCameraCachePrivate.POV |
|
void |
SetLastFrameCameraCacheTime ( |
Get value of LastFrameCameraCachePrivate.Time |
|
void |
SetManualCameraFade ( |
Turns on camera fading at the given opacity. |
|
void |
SetOrthoWidth ( |
Sets and locks the current orthographic width for the camera. |
|
void |
SetViewTarget ( |
Sets a new ViewTarget. |
|
void |
StartCameraFade ( |
Camera fades. Does a camera fade to/from a solid color. Animates automatically. Camera fades |
|
UCameraShake... |
StartCameraShake ( |
Camera Shakes. Plays a camera shake on this camera. Camera Shakes |
|
UCameraShake... |
StartCameraShakeFromSource ( |
Plays a camera shake on this camera. |
|
void |
StopAllCameraShakes ( |
Stops all active camera shakes on this camera. |
|
void |
StopAllCameraShakesFromSource ( |
Stops playing all shakes originating from the given source. |
|
void |
StopAllInstancesOfCameraShake ( |
Stops playing all shakes of the given class. |
|
void |
StopAllInstancesOfCameraShakeFromSource ( |
Stops playing all shakes of the given class originating from the given source. |
|
void |
StopAudioFade() |
|
|
void |
StopCameraFade() |
Stops camera fading. |
|
void |
StopCameraShake ( |
Immediately stops the given shake instance and invalidates it. |
|
void |
SwapPendingViewTargetWhenUsingClientSideCameraUpdates() |
ClientSide camera updates prevents DoUpdateCamera from swapping PendingViewTarget in when the blend is complete, just use a timer to swap. |
|
void |
UnlockFOV() |
Unlocks the FOV. |
|
void |
UnlockOrthoWidth() |
Unlocks OrthoWidth value |
|
void |
UpdateCamera ( |
Performs per-tick camera update. |
|
void |
UpdateCameraLensEffects ( |
Update any attached camera lens effects |
|
void |
UpdateCameraPhotographyOnly() |
Performs a photography camera tick even when the camera wouldn't normally be ticking. |
|
bool |
UpdatePhotographyCamera ( |
Overridable. |
|
void |
UpdatePhotographyPostProcessing ( |
Allows the photography system to override postprocessing |
|
void |
UpdateViewTarget ( |
Calculates an updated POV for the given viewtarget. |
|
void |
UpdateViewTargetInternal ( |
Does the actual work to UpdateViewTarget. |
Name | Description | ||
---|---|---|---|
|
void |
ApplyWorldOffset ( |
Called by owning level to shift an actor location and all relevant data structures by specified delta |
|
void |
Destroyed() |
Called when this actor is explicitly being destroyed during gameplay or in the editor, not called during level streaming or gameplay ending |
|
void |
EndPlay ( |
Overridable function called whenever this actor is being removed from a level |
|
void |
PostInitializeComponents() |
Allow actors to initialize themselves on the C++ side after all of their components have been initialized, only called during gameplay |
|
bool |
ShouldTickIfViewportsOnly() |
If true, actor is ticked even if TickType==LEVELTICK_ViewportsOnly |
Name |
Description |
|
---|---|---|
|
FOnBlendComplete |
Fires when ViewTarget is set to PendingViewTarget |
Name | Description | ||
---|---|---|---|
|
AEmitterCame... |
FindCameraLensEffect |
APlayerCameraManager::FindGenericCameraLensEffect is favored now, and this function forwards to that one. |
|
FMinimalView... |
GetCameraCachePOV() |
APlayerCameraManager::GetCameraCacheView is favored now, and this function forwards to that one. |
|
FMinimalView... |
GetLastFrameCameraCachePOV() |
APlayerCameraManager::GetLastFrameCameraCacheView is favored now, and this function forwards to that one. |