#include <ComposableCameraScreenSpaceConstraintsNode.h>
Inherits:
UComposableCameraCameraNodeBase
Node for constraining a pivot position in screen using either translation or rotation.
Public Attributes¶
| Return | Name | Description |
|---|---|---|
TObjectPtr< AActor > |
PivotActor |
|
EComposableCameraScreenSpaceMethod |
Method |
|
FVector2D |
SafeZoneCenter |
|
FVector2D |
SafeZoneWidth |
|
FVector2D |
SafeZoneHeight |
PivotActor¶
TObjectPtr< AActor > PivotActor
Method¶
EComposableCameraScreenSpaceMethod Method
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 |
|---|---|---|
UComposableCameraScreenSpaceConstraintsNode 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). |
UComposableCameraScreenSpaceConstraintsNode¶
inline
inline UComposableCameraScreenSpaceConstraintsNode()
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 Methods¶
| Return | Name | Description |
|---|---|---|
FVector |
EnsureWithinBoundsTranslation |
|
FRotator |
EnsureWithinBoundsRotation |
|
std::pair< float, float > |
GetTanHalfHORAndAspectRatio |
|
FVector |
GetCurrentPivot const |
EnsureWithinBoundsTranslation¶
FVector EnsureWithinBoundsTranslation(const FVector & Pivot, const FComposableCameraPose & CurrentPose, const float & AspectRatio, const float & TanHalfHOR)
EnsureWithinBoundsRotation¶
FRotator EnsureWithinBoundsRotation(const FVector & Pivot, const FComposableCameraPose & CurrentPose, float AspectRatio, float DegTanHalfHor)
GetTanHalfHORAndAspectRatio¶
std::pair< float, float > GetTanHalfHORAndAspectRatio(const FComposableCameraPose & OutCameraPose)
GetCurrentPivot¶
const
FVector GetCurrentPivot() const