FOVAngle
FOVAngle
#Overview
name: FOVAngle
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 48
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of FOVAngle is to control the field of view angle for camera-related components in Unreal Engine 5. It is primarily used in rendering and camera systems to define the visible area captured by a camera or viewport.
Key points about FOVAngle:
-
It is used in various Unreal Engine subsystems, including the rendering system, camera system, and editor viewport system.
-
The value is typically set in degrees and represents the horizontal field of view angle.
-
It is used in components like SceneCaptureComponent2D, CineCameraComponent, and various viewport clients.
-
The value is often used in calculations for perspective projection and frustum rendering.
-
In editor viewports, it can be adjusted by users to change the view perspective.
-
It interacts with other camera-related properties like aspect ratio and projection type.
-
The default value is often 90 degrees, but it can be customized based on specific needs.
Best practices when using FOVAngle:
-
Consider the target platform and performance implications when setting FOV values.
-
Be aware of how changes to FOVAngle might affect gameplay, especially in first-person or third-person games.
-
When using it in custom components, ensure to handle both perspective and orthographic projection modes appropriately.
-
In editor tools, provide user-friendly ways to adjust the FOV, similar to existing viewport controls.
-
When serializing or saving FOV values, consider using config properties for easy adjustment.
-
Be cautious when programmatically changing FOV during runtime, as it can cause disorientation for players if not handled smoothly.
-
When working with cinematic sequences or camera cuts, ensure proper handling of FOV transitions.
Developers should be aware that changes to FOVAngle can significantly impact the visual experience and potentially affect gameplay. It’s important to test thoroughly when modifying this value, especially in gameplay-critical scenarios.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:1825, section: [/Script/UnrealEd.EditorEngine]
- INI Section:
/Script/UnrealEd.EditorEngine
- Raw value:
90.000000
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Compositing/Composure/Source/Composure/Private/ComposureBlueprintLibrary.cpp:88
Scope (from outer to inner):
file
function void UComposureBlueprintLibrary::CopyCameraSettingsToSceneCapture
Source code excerpt:
if (SrcCineCameraComponent->CurrentFocalLength <= 0.0f)
{
Dst->FOVAngle = 0.0f;
}
else
{
const float OverscanSensorWidth = SrcCineCameraComponent->Filmback.SensorWidth * SrcCineCameraComponent->LensSettings.SqueezeFactor * OverscanFactor;
Dst->FOVAngle = FMath::RadiansToDegrees(2.0f * FMath::Atan(OverscanSensorWidth / (2.0f * OriginalFocalLength)));
}
}
else
{
Dst->FOVAngle = Src->FieldOfView;
}
const FPostProcessSettings& SrcPPSettings = CameraViewInfo.PostProcessSettings;
FPostProcessSettings& DstPPSettings = Dst->PostProcessSettings;
FWeightedBlendables DstWeightedBlendables = DstPPSettings.WeightedBlendables;
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Private/InputModifiers.cpp:307
Scope (from outer to inner):
file
function FInputActionValue UInputModifierFOVScaling::ModifyRaw_Implementation
Source code excerpt:
}
const float FOVAngle = PC->PlayerCameraManager ? PC->PlayerCameraManager->GetFOVAngle() : 1.f;
float Scale = FOVScale;
switch(FOVScalingType)
{
case EFOVScalingType::Standard:
// TODO: Fortnite falls back to old style FOV scaling for mouse input. Presumably for back compat, but this needs checking.
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Private/InputModifiers.cpp:319
Scope (from outer to inner):
file
function FInputActionValue UInputModifierFOVScaling::ModifyRaw_Implementation
Source code excerpt:
const float kPlayerInput_BaseFOV = 80.0f;
const float BaseHalfFOV = kPlayerInput_BaseFOV * 0.5f;
const float HalfFOV = FOVAngle * 0.5f;
const float BaseTanHalfFOV = FMath::Tan(FMath::DegreesToRadians(BaseHalfFOV));
const float TanHalfFOV = FMath::Tan(FMath::DegreesToRadians(HalfFOV));
check(BaseTanHalfFOV > 0.0f);
Scale *= (TanHalfFOV / BaseTanHalfFOV);
}
break;
case EFOVScalingType::UE4_BackCompat:
Scale *= FOVAngle;
break;
default:
checkf(false, TEXT("Unsupported FOV scaling type '%s'"), *UEnum::GetValueAsString(TEXT("EnhancedInput.EFovScalingType"), FOVScalingType));
break;
}
#Loc: <Workspace>/Engine/Plugins/Enterprise/DatasmithImporter/Source/DatasmithImporter/Private/Utility/DatasmithImportFactoryHelper.cpp:102
Scope (from outer to inner):
file
namespace DatasmithImportFactoryHelper
function void SetupSceneViewport
Source code excerpt:
{
// Reset the settings
GCurrentLevelEditingViewportClient->ViewFOV = GCurrentLevelEditingViewportClient->FOVAngle;
GCurrentLevelEditingViewportClient->SetActorLock( OriginalActorLock->Get() );
GCurrentLevelEditingViewportClient->UpdateViewForLockedActor();
// remove roll and pitch from camera when unbinding from actors
GEditor->RemovePerspectiveViewRotation( true, true, false );
#Loc: <Workspace>/Engine/Plugins/Experimental/Avalanche/Source/AvalancheViewport/Private/Interaction/AvaCameraZoomController.cpp:375
Scope (from outer to inner):
file
function float FAvaCameraZoomController::GetDefaultFOV
Source code excerpt:
if (const FEditorViewportClient* ViewportClient = AvaViewportClient->AsEditorViewportClient())
{
return ViewportClient->FOVAngle;
}
}
return FallbackFOV;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/CineCameraSceneCapture/Source/CineCameraSceneCapture/Private/CineCameraSceneCaptureComponent.cpp:176
Scope (from outer to inner):
file
function void UCineCaptureComponent2D::UpdateSceneCaptureContents
Source code excerpt:
PostProcessSettings = CineCameraComponent->PostProcessSettings;
FOVAngle = CineCameraComponent->FieldOfView;
bOverride_CustomNearClippingPlane = CineCameraComponent->bOverride_CustomNearClippingPlane;
CustomNearClippingPlane = CineCameraComponent->CustomNearClippingPlane;
CineCaptureSVE->PrepareRender(CineCameraComponent, bFollowSceneCaptureRenderPath);
Scene->UpdateSceneCaptureContents(this);
#Loc: <Workspace>/Engine/Plugins/Experimental/Mutable/Source/CustomizableObjectEditor/Private/MuCOE/SCustomizableObjectEditorViewportToolBar.cpp:595
Scope (from outer to inner):
file
function void SCustomizableObjectEditorViewportToolBar::OnFOVValueChanged
Source code excerpt:
TSharedPtr<FCustomizableObjectEditorViewportClient> ViewportClient = Viewport.Pin()->GetViewportClient();
ViewportClient->FOVAngle = NewValue;
// \todo: this editor name should be somewhere else.
FString EditorName("CustomizableObjectEditor");
int ViewportIndex=0;
ViewportClient->ConfigOption->SetViewFOV(FName(*EditorName),NewValue,ViewportIndex);
ViewportClient->ViewFOV = NewValue;
#Loc: <Workspace>/Engine/Plugins/Experimental/PanoramicCapture/Source/PanoramicCapture/Private/SceneCapturer.cpp:92
Scope (from outer to inner):
file
function void USceneCapturer::InitCaptureComponent
Source code excerpt:
CaptureComponent->SetVisibility( true );
CaptureComponent->SetHiddenInGame( false );
CaptureComponent->FOVAngle = FMath::Max( HFov, VFov );
CaptureComponent->bCaptureEveryFrame = false;
CaptureComponent->bCaptureOnMovement = false;
CaptureComponent->CaptureSource = ESceneCaptureSource::SCS_FinalColorLDR;
DisableUnsupportedPostProcesses(CaptureComponent);
const FName TargetName = MakeUniqueObjectName(this, UTextureRenderTarget2D::StaticClass(), TEXT("SceneCaptureTextureTarget"));
#Loc: <Workspace>/Engine/Plugins/Experimental/RenderGrid/Source/RenderGridEditor/Private/UI/SRenderGridViewerLive.cpp:22
Scope (from outer to inner):
file
function UE::RenderGrid::Private::FRenderGridEditorViewportClient::FRenderGridEditorViewportClient
Source code excerpt:
: FEditorViewportClient(nullptr, PreviewScene, InEditorViewportWidget)
{
FOVAngle = 90;
ViewFOV = 90;
Invalidate();
bDisableInput = true;
SetGameView(true);
SetRealtime(false); // we manually render every frame, because automatic rendering stops temporarily when you're dragging another widget (with the mouse)
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/Niagara/Private/DataInterface/NiagaraDataInterfaceSceneCapture2D.cpp:618
Scope (from outer to inner):
file
function bool UNiagaraDataInterfaceSceneCapture2D::PerInstanceTick
Source code excerpt:
CaptureComponent->bCaptureOnMovement = bManagedCaptureOnMovement;
CaptureComponent->ProjectionType = ManagedProjectionType;
CaptureComponent->FOVAngle = ManagedFOVAngle;
CaptureComponent->OrthoWidth = ManagedOrthoWidth;
if (ManagedShowOnlyActors.Num() > 0)
{
CaptureComponent->ShowOnlyActors = ManagedShowOnlyActors;
CaptureComponent->PrimitiveRenderMode = ESceneCapturePrimitiveRenderMode::PRM_UseShowOnlyList;
}
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Private/NiagaraBakerRenderer.cpp:372
Scope (from outer to inner):
file
function void FNiagaraBakerRenderer::RenderSceneCapture
Source code excerpt:
{
SceneCaptureComponent->ProjectionType = ECameraProjectionMode::Perspective;
SceneCaptureComponent->FOVAngle = CurrentCamera.FOV;
}
const FMatrix SceneCaptureMatrix = FMatrix(FPlane(0, 0, 1, 0), FPlane(1, 0, 0, 0), FPlane(0, 1, 0, 0), FPlane(0, 0, 0, 1));
FMatrix ViewMatrix = SceneCaptureMatrix * BakerSettings->GetViewportMatrix().Inverse() * FRotationTranslationMatrix(BakerSettings->GetCameraRotation(), BakerSettings->GetCameraLocation());
SceneCaptureComponent->SetWorldLocationAndRotation(ViewMatrix.GetOrigin(), ViewMatrix.Rotator());
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Private/Widgets/SNiagaraSystemViewport.cpp:665
Scope (from outer to inner):
file
function void FNiagaraSystemViewportClient::SaveSharedViewportSettingsToConfig
Source code excerpt:
ViewportSharedSettings.GameShowFlagsString = GameShowFlagsToSave.ToString();
ViewportSharedSettings.ExposureSettings = ExposureSettings;
ViewportSharedSettings.FOVAngle = FOVAngle;
ViewportSharedSettings.bShowOnScreenStats = ShouldShowStats();
SaveRealtimeStateToConfig(ViewportSharedSettings.bIsRealtime);
GetMutableDefault<UNiagaraEditorSettings>()->SetViewportSharedSettings(ViewportSharedSettings);
}
}
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Private/Widgets/SNiagaraSystemViewport.cpp:720
Scope (from outer to inner):
file
function void FNiagaraSystemViewportClient::LoadSharedSettingsFromConfig
Source code excerpt:
SetRealtime(ViewportSharedSettings.bIsRealtime);
SetShowStats(ViewportSharedSettings.bShowOnScreenStats);
ViewFOV = FOVAngle = ViewportSharedSettings.FOVAngle;
SetViewModes(ViewportSharedSettings.PerspViewModeIndex, ViewportSharedSettings.OrthoViewModeIndex );
}
void FNiagaraSystemViewportClient::SavePerAssetViewportSettings() const
{
if(UNiagaraSystemEditorData* SystemEditorData = GetSystemEditorData())
#Loc: <Workspace>/Engine/Plugins/FX/Niagara/Source/NiagaraEditor/Public/NiagaraEditorSettings.h:303
Scope: file
Source code excerpt:
/* Field of view angle for the viewport. */
UPROPERTY(config)
float FOVAngle = EditorViewportDefs::DefaultPerspectiveFOVAngle;
/* Whether this viewport is updating in real-time. */
UPROPERTY(config)
bool bIsRealtime = true;
/* Whether viewport statistics should be shown. */
#Loc: <Workspace>/Engine/Plugins/Runtime/MixedRealityCaptureFramework/Source/MixedRealityCaptureFramework/Private/MixedRealityCaptureComponent.cpp:546
Scope (from outer to inner):
file
function bool UMixedRealityCaptureComponent::GetEditorPreviewInfo
Source code excerpt:
ViewOut.Rotation = GetComponentRotation();
ViewOut.FOV = FOVAngle;
ViewOut.AspectRatio = GetDesiredAspectRatio();
ViewOut.bConstrainAspectRatio = true;
// see default in FSceneViewInitOptions
ViewOut.bUseFieldOfViewForLOD = true;
#Loc: <Workspace>/Engine/Plugins/Runtime/MixedRealityCaptureFramework/Source/MixedRealityCaptureFramework/Private/MixedRealityCaptureComponent.cpp:931
Scope (from outer to inner):
file
function void UMixedRealityCaptureComponent::RefreshFOV
Source code excerpt:
if (MRCaptureComponent_Impl::CaptureFOVOverride > 0.0f)
{
FOVAngle = MRCaptureComponent_Impl::CaptureFOVOverride;
}
else if (MRCaptureComponent_Impl::UseUndistortion && MRCaptureComponent_Impl::UseUndistortedFOV && !LensDistortionParameters.IsIdentity() && UndistortedCameraInfo.HorizontalFOV > 0)
{
FOVAngle = UndistortedCameraInfo.HorizontalFOV;
}
else if (CalibratedFOV > 0)
{
FOVAngle = CalibratedFOV;
}
}
//------------------------------------------------------------------------------
void UMixedRealityCaptureComponent::OnTrackingOriginChanged(const IXRTrackingSystem* /*TrackingSys*/)
{
#Loc: <Workspace>/Engine/Plugins/Runtime/MixedRealityCaptureFramework/Source/MixedRealityCaptureFramework/Private/MixedRealityCaptureComponent.cpp:1052
Scope (from outer to inner):
file
function void UMixedRealityCaptureComponent::FillOutCalibrationData
Source code excerpt:
// view info
{
Dst->LensData.FOV = FOVAngle;
Dst->LensData.DistortionParameters = LensDistortionParameters;
}
// alignment info
{
const FTransform RelativeXform = GetRelativeTransform();
Dst->AlignmentData.CameraOrigin = RelativeXform.GetLocation();
#Loc: <Workspace>/Engine/Plugins/Runtime/MixedRealityCaptureFramework/Source/MixedRealityCaptureFramework/Private/MrcGarbageMatteCaptureComponent.cpp:81
Scope (from outer to inner):
file
function void UMrcGarbageMatteCaptureComponent::ApplyCalibrationData_Implementation
Source code excerpt:
}
FOVAngle = ConfigData->LensData.FOV;
if (ensure(GarbageMatteActor))
{
GarbageMatteActor->ApplyCalibrationData(ConfigData->GarbageMatteSaveDatas);
}
}
#Loc: <Workspace>/Engine/Plugins/Runtime/MixedRealityCaptureFramework/Source/MixedRealityCaptureFramework/Private/MrcGarbageMatteCaptureComponent.cpp:128
Scope (from outer to inner):
file
function void UMrcGarbageMatteCaptureComponent::PollFocalDriver
Source code excerpt:
if (FocalDriver.GetObject() != nullptr && FocalDriver.GetObject()->Implements<UMrcFocalDriver>())
{
FOVAngle = IMrcFocalDriver::Execute_GetHorizontalFieldOfView(FocalDriver.GetObject());
}
}
//------------------------------------------------------------------------------
AMrcGarbageMatteActor* UMrcGarbageMatteCaptureComponent::SpawnNewGarbageMatteActor_Implementation(USceneComponent* InTrackingOrigin)
{
#Loc: <Workspace>/Engine/Plugins/VirtualProduction/VirtualCameraCore/Source/VCamCore/Private/Output/VCamOutputRemoteSession.cpp:154
Scope (from outer to inner):
file
function void UVCamOutputRemoteSession::DestroyRemoteSession
Source code excerpt:
if (FLevelEditorViewportClient* LevelViewportClient = GetTargetLevelViewportClient())
{
LevelViewportClient->ViewFOV = LevelViewportClient->FOVAngle;
GEditor->RemovePerspectiveViewRotation(true, true, false);
}
}
}
#endif
}
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/LevelEditorSubsystem.cpp:185
Scope (from outer to inner):
file
function void ULevelEditorSubsystem::EjectPilotLevelActor
Source code excerpt:
//{
// // Reset the settings
// LevelViewportClient.ViewFOV = LevelViewportClient.FOVAngle;
//}
LevelViewportClient.SetActorLock(nullptr);
// remove roll and pitch from camera when unbinding from actors
GEditor->RemovePerspectiveViewRotation(true, true, false);
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/SLevelViewport.cpp:605
Scope (from outer to inner):
file
function void SLevelViewport::ConstructLevelEditorViewportClient
Source code excerpt:
LevelViewportClient->bDrawBaseInfo = true;
LevelViewportClient->bDrawVertices = true;
LevelViewportClient->ViewFOV = LevelViewportClient->FOVAngle = ViewportInstanceSettings.FOVAngle;
LevelViewportClient->OverrideFarClipPlane( ViewportInstanceSettings.FarViewPlane );
// Set the selection outline flag based on preferences
LevelViewportClient->EngineShowFlags.SetSelectionOutline(GetDefault<ULevelEditorViewportSettings>()->bUseSelectionOutline);
// Always composite editor objects after post processing in the editor
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/SLevelViewport.cpp:2339
Scope (from outer to inner):
file
function void SLevelViewport::SaveConfig
Source code excerpt:
ViewportInstanceSettings.GPUSkinCacheVisualizationMode = LevelViewportClient->CurrentGPUSkinCacheVisualizationMode;
ViewportInstanceSettings.ExposureSettings = LevelViewportClient->ExposureSettings;
ViewportInstanceSettings.FOVAngle = LevelViewportClient->FOVAngle;
ViewportInstanceSettings.bAllowCinematicControl = LevelViewportClient->AllowsCinematicControl();
LevelViewportClient->SaveRealtimeStateToConfig(ViewportInstanceSettings.bIsRealtime);
ViewportInstanceSettings.bShowOnScreenStats = LevelViewportClient->ShouldShowStats();
ViewportInstanceSettings.FarViewPlane = LevelViewportClient->GetFarClipPlaneOverride();
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/SLevelViewport.cpp:2479
Scope (from outer to inner):
file
function void SLevelViewport::OnToggleAllowCinematicPreview
Source code excerpt:
{
// Reset the FOV of Viewport for cases where we have been previewing the cinematic with a changing FOV
LevelViewportClient->ViewFOV = LevelViewportClient->AllowsCinematicControl() ? LevelViewportClient->ViewFOV : LevelViewportClient->FOVAngle;
LevelViewportClient->SetAllowCinematicControl( !LevelViewportClient->AllowsCinematicControl() );
LevelViewportClient->Invalidate( false );
}
bool SLevelViewport::AllowsCinematicPreview() const
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/SLevelViewport.cpp:2599
Scope (from outer to inner):
file
function void SLevelViewport::OnActorUnlock
Source code excerpt:
{
// Reset the settings
LevelViewportClient->ViewFOV = LevelViewportClient->FOVAngle;
}
LevelViewportClient->SetActorLock(nullptr);
// remove roll and pitch from camera when unbinding from actors
GEditor->RemovePerspectiveViewRotation(true, true, false);
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/SLevelViewportToolBar.cpp:1393
Scope (from outer to inner):
file
function void SLevelViewportToolBar::OnFOVValueChanged
Source code excerpt:
if ( bUpdateStoredFOV )
{
ViewportClient.FOVAngle = NewValue;
}
ViewportClient.ViewFOV = NewValue;
ViewportClient.Invalidate();
}
#Loc: <Workspace>/Engine/Source/Editor/MovieSceneTools/Private/TrackEditors/TransformTrackEditor.cpp:152
Scope (from outer to inner):
file
function void F3DTransformTrackEditor::OnRelease
Source code excerpt:
if (LevelVC && LevelVC->IsPerspective() && LevelVC->GetViewMode() != VMI_Unknown)
{
LevelVC->ViewFOV = LevelVC->FOVAngle;
}
}
}
TSharedRef<ISequencerTrackEditor> F3DTransformTrackEditor::CreateTrackEditor( TSharedRef<ISequencer> InSequencer )
{
#Loc: <Workspace>/Engine/Source/Editor/MovieSceneTools/Private/TrackEditors/TransformTrackEditor.cpp:726
Scope (from outer to inner):
file
function void F3DTransformTrackEditor::LockCameraBinding
Source code excerpt:
ViewportClient->SetActorLock(nullptr);
ViewportClient->bLockedCameraView = false;
ViewportClient->ViewFOV = ViewportClient->FOVAngle;
ViewportClient->RemoveCameraRoll();
ViewportClient->UpdateViewForLockedActor();
ViewportClient->Invalidate();
}
}
}
#Loc: <Workspace>/Engine/Source/Editor/Persona/Private/SAnimViewportToolBar.cpp:1322
Scope (from outer to inner):
file
function void SAnimViewportToolBar::OnFOVValueChanged
Source code excerpt:
FEditorViewportClient& ViewportClient = Viewport.Pin()->GetLevelViewportClient();
ViewportClient.FOVAngle = NewValue;
FAnimationViewportClient& AnimViewportClient = (FAnimationViewportClient&)(ViewportClient);
AnimViewportClient.ConfigOption->SetViewFOV(AnimViewportClient.GetAssetEditorToolkit()->GetEditorName(), NewValue, AnimViewportClient.GetViewportIndex());
ViewportClient.ViewFOV = NewValue;
ViewportClient.Invalidate();
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/LevelEditorViewportSettings.h:104
Scope (from outer to inner):
file
function FLevelEditorViewportInstanceSettings
Source code excerpt:
, GPUSkinCacheVisualizationMode()
, ExposureSettings()
, FOVAngle(EditorViewportDefs::DefaultPerspectiveFOVAngle)
, FarViewPlane(0)
, bIsRealtime(false)
, bShowFPS_DEPRECATED(false)
// Show 'lighting needs to be rebuilt' message by default, avoids confusion when artists think lighting is built until they PIE
, bShowOnScreenStats(true)
, bShowFullToolbar(true)
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/LevelEditorViewportSettings.h:178
Scope: file
Source code excerpt:
/* Field of view angle for the viewport. */
UPROPERTY(config)
float FOVAngle;
/* Position of the var plane in the editor viewport */
UPROPERTY(config)
float FarViewPlane;
/* Whether this viewport is updating in real-time. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorViewportClient.cpp:419
Scope (from outer to inner):
file
function FEditorViewportClient::FEditorViewportClient
Source code excerpt:
, ViewIndex(INDEX_NONE)
, ViewFOV(EditorViewportDefs::DefaultPerspectiveFOVAngle)
, FOVAngle(EditorViewportDefs::DefaultPerspectiveFOVAngle)
, AspectRatio(1.777777f)
, bForcingUnlitForNewMap(false)
, bWidgetAxisControlledByDrag(false)
, bNeedsRedraw(true)
, bNeedsLinkedRedraw(false)
, bNeedsInvalidateHitProxy(false)
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/LevelEditorViewport.cpp:2727
Scope (from outer to inner):
file
function void FLevelEditorViewportClient::ResetCamera
Source code excerpt:
ViewTransformOrthographic.SetOrthoZoom(DEFAULT_ORTHOZOOM);
ViewFOV = FOVAngle;
SetIsCameraCut();
// Broadcast 'camera moved' delegate
FEditorDelegates::OnEditorCameraMoved.Broadcast(GetViewLocation(), GetViewRotation(), ViewportType, ViewIndex);
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/LevelEditorViewport.cpp:2760
Scope (from outer to inner):
file
function void FLevelEditorViewportClient::RestoreCameraFromPIE
Source code excerpt:
if( IsPerspective() )
{
ViewFOV = FOVAngle;
RemoveCameraRoll();
}
}
void FLevelEditorViewportClient::ReceivedFocus(FViewport* InViewport)
{
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/LevelEditorViewport.cpp:4838
Scope (from outer to inner):
file
function static void RenderViewFrustum
Source code excerpt:
FVector Verts[8];
// FOVAngle controls the horizontal angle.
float HozHalfAngle = (FrustumAngle) * ((float)PI/360.f);
float HozLength = FrustumStartDist * FMath::Tan(HozHalfAngle);
float VertLength = HozLength/FrustumAspectRatio;
// near plane verts
Verts[0] = (Direction * FrustumStartDist) + (UpVector * VertLength) + (LeftVector * HozLength);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/SCommonEditorViewportToolbarBase.cpp:767
Scope (from outer to inner):
file
function void SCommonEditorViewportToolbarBase::OnFOVValueChanged
Source code excerpt:
{
FEditorViewportClient& ViewportClient = GetViewportClient();
ViewportClient.FOVAngle = NewValue;
ViewportClient.ViewFOV = NewValue;
ViewportClient.Invalidate();
}
TSharedRef<SWidget> SCommonEditorViewportToolbarBase::GenerateFarViewPlaneMenu() const
{
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Public/EditorViewportClient.h:1813
Scope (from outer to inner):
file
class class FEditorViewportClient : public FCommonViewportClient, public FViewElementDrawer, public FGCObject
Source code excerpt:
float ViewFOV;
/** Viewport's stored horizontal field of view (saved in ini files). */
float FOVAngle;
float AspectRatio;
/** true if we've forced the SHOW_Lighting show flag off because there are no lights in the scene */
bool bForcingUnlitForNewMap;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Classes/Components/SceneCaptureComponent2D.h:28
Scope (from outer to inner):
file
class class USceneCaptureComponent2D : public USceneCaptureComponent
Source code excerpt:
/** Camera field of view (in degrees). */
UPROPERTY(interp, EditAnywhere, BlueprintReadWrite, Category=Projection, meta=(DisplayName = "Field of View", UIMin = "5.0", UIMax = "170", ClampMin = "0.001", ClampMax = "360.0", editcondition = "ProjectionType==0"))
float FOVAngle;
/** The desired width (in world units) of the orthographic view (ignored in Perspective mode) */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Projection, meta = (editcondition = "ProjectionType==1"))
float OrthoWidth;
/** Automatically determine a min/max Near/Far clip plane position depending on OrthoWidth value */
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/DrawFrustumComponent.cpp:51
Scope (from outer to inner):
file
class class FDrawFrustumSceneProxy final : public FPrimitiveSceneProxy
function virtual void GetDynamicMeshElements
Source code excerpt:
FVector Verts[8];
// FOVAngle controls the horizontal angle.
const float HozHalfAngleInRadians = FMath::DegreesToRadians(FrustumAngle * 0.5f);
float HozLength = 0.0f;
float VertLength = 0.0f;
if (FrustumAngle > 0.0f)
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:551
Scope (from outer to inner):
file
function USceneCaptureComponent2D::USceneCaptureComponent2D
Source code excerpt:
: Super(ObjectInitializer)
{
FOVAngle = 90.0f;
OrthoWidth = DEFAULT_ORTHOWIDTH;
bAutoCalculateOrthoPlanes = true;
AutoPlaneShift = 0.0f;
bUpdateOrthoPlanes = false;
bUseCameraHeightAsViewTarget = false;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:675
Scope (from outer to inner):
file
function void USceneCaptureComponent2D::SetCameraView
Source code excerpt:
SetWorldRotation(DesiredView.Rotation);
FOVAngle = DesiredView.FOV;
ProjectionType = DesiredView.ProjectionMode;
OrthoWidth = DesiredView.OrthoWidth;
}
void USceneCaptureComponent2D::GetCameraView(float DeltaTime, FMinimalViewInfo& OutMinimalViewInfo)
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:685
Scope (from outer to inner):
file
function void USceneCaptureComponent2D::GetCameraView
Source code excerpt:
OutMinimalViewInfo.Rotation = GetComponentRotation();
OutMinimalViewInfo.FOV = FOVAngle;
OutMinimalViewInfo.AspectRatio = TextureTarget ? (float(TextureTarget->SizeX) / TextureTarget->SizeY) : 1.f;
OutMinimalViewInfo.bConstrainAspectRatio = false;
OutMinimalViewInfo.ProjectionMode = ProjectionType;
OutMinimalViewInfo.OrthoWidth = OrthoWidth;
OutMinimalViewInfo.bAutoCalculateOrthoPlanes = bAutoCalculateOrthoPlanes;
OutMinimalViewInfo.AutoPlaneShift = AutoPlaneShift;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:762
Scope (from outer to inner):
file
function void USceneCaptureComponent2D::UpdateDrawFrustum
Source code excerpt:
if (ProjectionType == ECameraProjectionMode::Perspective)
{
DrawFrustum->FrustumAngle = FOVAngle;
}
else
{
DrawFrustum->FrustumAngle = -OrthoWidth;
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:787
Scope (from outer to inner):
file
function bool USceneCaptureComponent2D::CanEditChange
Source code excerpt:
if (bUseCustomProjectionMatrix
&& (PropertyName == GET_MEMBER_NAME_STRING_CHECKED(USceneCaptureComponent2D, ProjectionType)
|| PropertyName == GET_MEMBER_NAME_STRING_CHECKED(USceneCaptureComponent2D, FOVAngle)
|| PropertyName == GET_MEMBER_NAME_STRING_CHECKED(USceneCaptureComponent2D, OrthoWidth)))
{
return false;
}
if (PropertyName == GET_MEMBER_NAME_STRING_CHECKED(USceneCaptureComponent2D, FOVAngle))
{
return ProjectionType == ECameraProjectionMode::Perspective;
}
else if (PropertyName == GET_MEMBER_NAME_STRING_CHECKED(USceneCaptureComponent2D, OrthoWidth))
{
return ProjectionType == ECameraProjectionMode::Orthographic;
#Loc: <Workspace>/Engine/Source/Runtime/MovieSceneTracks/Private/TrackInstances/MovieSceneCameraCutEditorHandler.cpp:295
Scope (from outer to inner):
file
namespace UE::MovieScene
function void FCameraCutEditorHandler::SetCameraCutForViewport
Source code excerpt:
ViewLocation = CameraComponent ? CameraComponent->GetComponentLocation() : CameraActor->GetActorLocation();
ViewRotation = CameraComponent ? CameraComponent->GetComponentRotation() : CameraActor->GetActorRotation();
ViewFOV = CameraComponent ? CameraComponent->FieldOfView : ViewportClient.FOVAngle;
bCameraHasBeenCut = bCameraHasBeenCut || !ViewportClient.IsLockedToActor(CameraActor);
}
else
{
// If CameraActor is null, we are releasing camera control. This can happen here instead of
// inside pre-animated state if we are *blending* out of the cinematic. In this case, let's
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneCaptureRendering.cpp:876
Scope (from outer to inner):
file
function void FScene::UpdateSceneCaptureContents
Source code excerpt:
FPlane(0, 1, 0, 0),
FPlane(0, 0, 0, 1));
const float FOV = CaptureComponent->FOVAngle * (float)PI / 360.0f;
FIntPoint CaptureSize(TextureRenderTarget->GetSurfaceWidth(), TextureRenderTarget->GetSurfaceHeight());
const bool bUseSceneColorTexture = CaptureNeedsSceneColor(CaptureComponent->CaptureSource);
const bool bEnableOrthographicTiling = (CaptureComponent->GetEnableOrthographicTiling() && CaptureComponent->ProjectionType == ECameraProjectionMode::Orthographic && bUseSceneColorTexture);
if (CaptureComponent->GetEnableOrthographicTiling() && CaptureComponent->ProjectionType == ECameraProjectionMode::Orthographic && !bUseSceneColorTexture)
{
#Loc: <Workspace>/Projects/Lyra/Plugins/GameFeatures/ShooterCore/Source/ShooterCoreRuntime/Private/Input/AimAssistTargetManagerComponent.cpp:353
Scope (from outer to inner):
file
function float UAimAssistTargetManagerComponent::GetFOVScale
Source code excerpt:
if (PC->PlayerCameraManager && DefaultInputSettings->bEnableFOVScaling)
{
const float FOVAngle = PC->PlayerCameraManager->GetFOVAngle();
switch (InputType)
{
case ECommonInputType::Gamepad:
case ECommonInputType::Touch:
{
static const float PlayerInput_BaseFOV = 80.0f;
#Loc: <Workspace>/Projects/Lyra/Plugins/GameFeatures/ShooterCore/Source/ShooterCoreRuntime/Private/Input/AimAssistTargetManagerComponent.cpp:363
Scope (from outer to inner):
file
function float UAimAssistTargetManagerComponent::GetFOVScale
Source code excerpt:
// Ideally mouse would use this too but changing it now will cause sensitivity to change for existing players.
const float BaseHalfFOV = PlayerInput_BaseFOV * 0.5f;
const float HalfFOV = FOVAngle * 0.5f;
const float BaseTanHalfFOV = FMath::Tan(FMath::DegreesToRadians(BaseHalfFOV));
const float TanHalfFOV = FMath::Tan(FMath::DegreesToRadians(HalfFOV));
check(BaseTanHalfFOV > 0.0f);
FovScale = (TanHalfFOV / BaseTanHalfFOV);
break;
}
case ECommonInputType::MouseAndKeyboard:
FovScale = (DefaultInputSettings->FOVScale * FOVAngle);
break;
default:
ensure(false);
break;
}
}