RealDocs

UCameraComponent::SetProjectionMode

function Engine Blueprint Since unknown
#include "Camera/CameraComponent.h"
Access: public Specifiers: UFUNCTIONBlueprintCallable

Description

Sets whether this camera renders using perspective or orthographic projection.

Caveats & Gotchas

  • Simple property setter — it does not clamp or validate OrthoWidth/FieldOfView for the new mode, so make sure those are set sensibly for the mode you're switching to.

Signature

UFUNCTION(BlueprintCallable, Category = Camera)
void SetProjectionMode(ECameraProjectionMode::Type InProjectionMode) { ProjectionMode = InProjectionMode; }

Parameters

Name Type Description Default
InProjectionMode ECameraProjectionMode::Type The new projection mode — Perspective or Orthographic.

Return Type

void

Example

Switch to orthographic via Blueprint-callable setter C++
CameraComponent->SetProjectionMode(ECameraProjectionMode::Orthographic);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.