#include <ComposableCameraScreenSpacePivotNode.h>
Inherits:
UComposableCameraCameraNodeBase
Node for positioning the given pivot point in the given screen space.
Public Attributes¶
| Return | Name | Description |
|---|---|---|
EComposableCameraScreenSpacePivotSource |
PivotSource |
|
FVector |
PivotWorldPosition |
|
TObjectPtr< AActor > |
PivotActor |
|
float |
PivotWorldUpOffset |
|
EComposableCameraScreenSpaceMethod |
Method |
|
FComposableCameraScreenSpaceTranslationParams |
TranslationParams |
|
FComposableCameraScreenSpaceRotationParams |
RotationParams |
|
FVector2D |
SafeZoneCenter |
|
FVector2D |
SafeZoneWidth |
|
FVector2D |
SafeZoneHeight |
PivotSource¶
EComposableCameraScreenSpacePivotSource PivotSource { }
PivotWorldPosition¶
FVector PivotWorldPosition { FVector::ZeroVector }
PivotActor¶
TObjectPtr< AActor > PivotActor
PivotWorldUpOffset¶
float PivotWorldUpOffset { 0.f }
Method¶
EComposableCameraScreenSpaceMethod Method
TranslationParams¶
FComposableCameraScreenSpaceTranslationParams TranslationParams
RotationParams¶
FComposableCameraScreenSpaceRotationParams RotationParams
SafeZoneCenter¶
FVector2D SafeZoneCenter { 0.0, 0.0 }
SafeZoneWidth¶
FVector2D SafeZoneWidth { -0.1, 0.1 }
SafeZoneHeight¶
FVector2D SafeZoneHeight { -0.1, 0.1 }
Public Methods¶
| Return | Name | Description |
|---|---|---|
UComposableCameraScreenSpacePivotNode inline |
||
void |
OnInitialize_Implementation virtual |
|
void |
OnTickNode_Implementation virtual |
|
void |
GetPinDeclarations_Implementation virtual const |
|
void |
DrawNodeDebug virtual const |
Called each frame when the CCS.Debug.Viewport CVar is enabled, for every node on the currently running camera. Override to draw world-space debug gizmos via DrawDebugHelpers (DrawDebugSphere, DrawDebugLine, etc.) that visualise this node's runtime state — e.g. a pivot sphere for PivotOffsetNode, a look-at line for LookAtNode, the collision trace for CollisionPushNode, a sampled spline path for SplineNode. |
void |
DrawNodeDebug2D virtual const |
2D counterpart to DrawNodeDebug. Fires from a separate UDebugDrawService hook on the "Game" channel — which means it runs during PIE-possessed play (and standalone), NOT during F8 eject (editor viewport doesn't route through the game channel). That lines up with what 2D overlays are good for: screen-space debug that the player-eye perspective answers and an external view cannot (safe-zone rectangles, projected pivot markers, HUD-space gizmos). |
UComposableCameraScreenSpacePivotNode¶
inline
inline UComposableCameraScreenSpacePivotNode()
OnInitialize_Implementation¶
virtual
virtual void OnInitialize_Implementation()
OnTickNode_Implementation¶
virtual
virtual void OnTickNode_Implementation(float DeltaTime, const FComposableCameraPose & CurrentCameraPose, FComposableCameraPose & OutCameraPose)
GetPinDeclarations_Implementation¶
virtual const
virtual void GetPinDeclarations_Implementation(TArray< FComposableCameraNodePinDeclaration > & OutPins) const
DrawNodeDebug¶
virtual const
virtual void DrawNodeDebug(UWorld * World, bool bViewerIsOutsideCamera) const
Called each frame when the CCS.Debug.Viewport CVar is enabled, for every node on the currently running camera. Override to draw world-space debug gizmos via DrawDebugHelpers (DrawDebugSphere, DrawDebugLine, etc.) that visualise this node's runtime state — e.g. a pivot sphere for PivotOffsetNode, a look-at line for LookAtNode, the collision trace for CollisionPushNode, a sampled spline path for SplineNode.
Access the owning camera via OwningCamera and current-frame pin values via the usual GetInputPinValue<T>() / member-read path — this hook fires AFTER TickNode, so pin-backed UPROPERTYs still hold the resolved values from the most recent evaluation.
bViewerIsOutsideCamera mirrors the ticker's frustum-draw flag: true when the viewer is observing the camera from outside (F8 eject, SIE, or CCS.Debug.Viewport.AlwaysShow), false when the player is looking through the camera. Most gizmos (pivot spheres at distant characters, lines to look-at targets, spline polylines far in the world) can ignore this and draw unconditionally. Gizmos that sit AT the camera's own position (e.g. CollisionPushNode's self-collision sphere) should gate on this bool so they don't hermetically seal the player inside the wireframe during live gameplay.
Default implementation does nothing. Compiled out in shipping builds.
DrawNodeDebug2D¶
virtual const
virtual void DrawNodeDebug2D(UCanvas * Canvas, APlayerController * PC) const
2D counterpart to DrawNodeDebug. Fires from a separate UDebugDrawService hook on the "Game" channel — which means it runs during PIE-possessed play (and standalone), NOT during F8 eject (editor viewport doesn't route through the game channel). That lines up with what 2D overlays are good for: screen-space debug that the player-eye perspective answers and an external view cannot (safe-zone rectangles, projected pivot markers, HUD-space gizmos).
Canvas provides the 2D surface; PC is the local player controller whose view is being rendered (for ProjectWorldToScreen and aspect ratio queries). Either may be null in edge cases — always check.
Default implementation does nothing. Compiled out in shipping builds.
Private Attributes¶
| Return | Name | Description |
|---|---|---|
TUniquePtr< TCameraInterpolator< TValueTypeWrapper< double > > > |
XInterpolator_T |
|
TUniquePtr< TCameraInterpolator< TValueTypeWrapper< double > > > |
YInterpolator_T |
|
TUniquePtr< TCameraInterpolator< TValueTypeWrapper< double > > > |
ZInterpolator_T |
|
TUniquePtr< TCameraInterpolator< TValueTypeWrapper< double > > > |
YawInterpolator_T |
|
TUniquePtr< TCameraInterpolator< TValueTypeWrapper< double > > > |
PitchInterpolator_T |
XInterpolator_T¶
TUniquePtr< TCameraInterpolator< TValueTypeWrapper< double > > > XInterpolator_T
YInterpolator_T¶
TUniquePtr< TCameraInterpolator< TValueTypeWrapper< double > > > YInterpolator_T
ZInterpolator_T¶
TUniquePtr< TCameraInterpolator< TValueTypeWrapper< double > > > ZInterpolator_T
YawInterpolator_T¶
TUniquePtr< TCameraInterpolator< TValueTypeWrapper< double > > > YawInterpolator_T
PitchInterpolator_T¶
TUniquePtr< TCameraInterpolator< TValueTypeWrapper< double > > > PitchInterpolator_T
Private Methods¶
| Return | Name | Description |
|---|---|---|
void |
EnsureWithinBoundsTranslation |
|
void |
EnsureWithinBoundsRotation |
|
std::pair< float, float > |
GetTanHalfHORAndAspectRatio |
|
FVector |
GetScreenSpaceTranslateAmount |
|
FRotator |
GetScreenSpaceRotateAmount |
|
FVector |
GetCurrentPivot const |
EnsureWithinBoundsTranslation¶
void EnsureWithinBoundsTranslation(const FVector & CameraSpacePivotPosition, FVector & CameraSpaceDampedOffset, const float & AspectRatio, const float & TanHalfHOR, const float & CameraDistance)
EnsureWithinBoundsRotation¶
void EnsureWithinBoundsRotation(const FRotator & CameraRotation, const FVector & LookAtRotation, FRotator & DeltaRotation, float AspectRatio, float DegTanHalfHor)
GetTanHalfHORAndAspectRatio¶
std::pair< float, float > GetTanHalfHORAndAspectRatio(const FComposableCameraPose & OutCameraPose)
GetScreenSpaceTranslateAmount¶
FVector GetScreenSpaceTranslateAmount(const FVector & Pivot, const FComposableCameraPose & OutCameraPose, float DeltaTime)
GetScreenSpaceRotateAmount¶
FRotator GetScreenSpaceRotateAmount(const FVector & Pivot, const FComposableCameraPose & OutCameraPose, float DeltaTime)
GetCurrentPivot¶
const
FVector GetCurrentPivot() const