Skip to content

Sein Targeter Preview

Class · ASeinTargeterPreview : AActor

#include "Targeter/SeinTargeterPreview.h"

can be subclassed in Blueprint

Base actor that shows a target-capture session while a player aims an ability. It receives the capture state each frame; override its events to add your own visuals, or use one of the shipped point, facing and line previews.

Initialize this preview with the spec that drove its spawn. Stores the spec for subclasses to read declared parameters (radius, footprint, etc.) during Tick / state updates. Called by the subsystem right after spawn.

void InitializePreview(USeinTargeterSpec* InSpec, float InAreaRadiusWorld);

Called after each captured input cycle so multi-cycle previews can accumulate committed visuals (placed trench segments, earlier grenade markers). Start/End are the cycle’s primary and aux points; End equals Start for point captures. Base implementation is a no-op.

void NotifyPointCaptured(const FVector& StartWorld, const FVector& EndWorld);

Overridable in Blueprint, with a native default

Runs once after context and visual helpers are initialized. Override to build custom visuals.

void OnPreviewInitialized();

Overridable in Blueprint, with a native default

Runs initially and whenever validity or its reason changes. Helpers have already updated materials.

void OnValidityChanged(ESeinTargeterValidity PreviousValidity);

Overridable in Blueprint, with a native default

Runs once before teardown. Submitted means command submission, not successful gameplay execution.

void OnPreviewEnded(ESeinPreviewEndReason Reason);

Overridable in Blueprint, with a native default

Subclass hook — called from each Present after the visual helpers update. Default impl is a no-op; subclasses override to drive material params, decal transforms, mesh colors, etc. BlueprintNativeEvent so designers can override visualization in BP without C++.

void OnPreviewUpdated();

Overridable in Blueprint, with a native default

Subclass hook — called from NotifyPointCaptured after a cycle commits. BlueprintNativeEvent so BP previews can accumulate visuals too.

void OnPointCaptured(const FVector& StartWorld, const FVector& EndWorld);

bool bFollowResolvedTarget · default true

Editable in class defaults · Blueprint read-only

Follow the confirmed target pose automatically. Disable when Blueprint owns the actor transform.

FSeinTargeterPreviewContext Context

Blueprint read-only

Latest read-only target capture snapshot. Available before Preview Initialized.

TObjectPtr<USeinTargeterSpec> Spec

Blueprint read-only

Spec that spawned this preview. Subclasses cast to their concrete type.

float AreaRadiusWorld · default 0.0f

Blueprint read-only

Cached AoE radius in world units (read from USeinAbility::AreaRadius on subsystem activation; converted to float for render-side use). Zero when the originating ability is not AoE.

FVector CurrentCursorWorld · default FVector::ZeroVector

Blueprint read-only

Where the cursor points on the ground, in world units.

FVector CurrentDragAnchorWorld · default FVector::ZeroVector

Blueprint read-only

Where the current drag began, in world units.

ESeinTargeterValidity CurrentValidity · default ESeinTargeterValidity::Valid

Blueprint read-only

Whether the current target is valid, valid with a warning, or blocked.

float CurrentDragYawDegrees · default 0.0f

Blueprint read-only

Yaw (degrees) the subsystem will capture on confirm — already snapped if RotationStepDegrees > 0, raw cursor direction otherwise. Drag-aware previews use this directly for actor rotation so visual matches capture.

C++ members (4)
  • void BeginPreview(const FSeinTargeterPreviewContext& InContext); Start presentation after deferred spawning and component initialization finish.
  • void Present(const FSeinTargeterPreviewContext& InContext); Deliver a complete snapshot without requiring Blueprint to derive capture geometry.
  • void EndPreview(ESeinPreviewEndReason Reason, bool bNotify = true); Deliver the final reason once, before the actor is destroyed.
  • void SetCaptureHasAnchor(bool bHasAnchor); Preserve anchor presence independently of its coordinates, including the world origin.