UCameraComponent
Inherits: UObjectBase › UObjectBaseUtility › UObject › UActorComponent › USceneComponent › UCameraComponent
#include "Camera/CameraComponent.h" Description
A component that defines a camera view. Attach it to an actor to make that actor capable of providing a camera perspective to the player.
Caveats & Gotchas
- • The camera only becomes active when the owning actor is possessed and the player's view target is set. Attaching a UCameraComponent does not automatically make it the active camera.
- • FOV, aspect ratio, and projection mode are set on the component. Post-process settings can also be applied here.
- • Typically paired with a USpringArmComponent to get a smooth third-person follow camera.
Example
Add a camera to a character C++
UCameraComponent* Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
Camera->SetupAttachment(SpringArm, USpringArmComponent::SocketName);
Camera->bUsePawnControlRotation = false; Functions (14)
Lifecycle 1 ▼
| Access | Type | Name |
|---|---|---|
| public | function | UCameraComponent::OnRegister |
Transform 1 ▼
| Access | Type | Name |
|---|---|---|
| public | function | UCameraComponent::OnUpdateTransform |
Rendering 2 ▼
| Access | Type | Name |
|---|---|---|
| public | function | UCameraComponent::AddOrUpdateBlendable |
| public | function | UCameraComponent::RemoveBlendable |
Camera 4 ▼
| Access | Type | Name |
|---|---|---|
| public | function | UCameraComponent::SetProjectionMode |
| public | function | UCameraComponent::GetCameraView |
| public | function | UCameraComponent::SetPostProcessBlendWeight |
| public | function | UCameraComponent::NotifyCameraCut |
PostProcess 3 ▼
| Access | Type | Name |
|---|---|---|
| public | function | UCameraComponent::AddExtraPostProcessBlend |
| public | function | UCameraComponent::ClearExtraPostProcessBlends |
| public | function | UCameraComponent::GetExtraPostProcessBlends |
View Offset 3 ▼
| Access | Type | Name |
|---|---|---|
| public | function | UCameraComponent::AddAdditiveOffset |
| public | function | UCameraComponent::ClearAdditiveOffset |
| public | function | UCameraComponent::GetAdditiveOffset |
Properties
| Access | Type | Name |
|---|---|---|
| public | property | UCameraComponent::PostProcessBlendWeight |
| public | property | UCameraComponent::PostProcessSettings |
| public | property | UCameraComponent::ProjectionMode |
See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?