Sein Camera Pawn
Class · ASeinCameraPawn : APawn
#include "Player/SeinCameraPawn.h"
can be subclassed in Blueprint
The default RTS camera. A pivot at the root moves along the ground, a spring arm supplies zoom and pitch, and the camera hangs off the arm. Every tuning value can be changed per Blueprint or per placed instance. It implements Sein Snapshot Camera Provider so saves restore its view; a custom camera pawn opts in by implementing the same interface.
Functions
Section titled “Functions”Follow Entity
Section titled “Follow Entity”Follow an entity. Set to Invalid to stop following. Auto-disables on manual input.
void FollowEntity(FSeinEntityHandle Entity);Stop Following
Section titled “Stop Following”Stop following any entity.
void StopFollowing();Is Following
Section titled “Is Following”Whether the camera is currently following an entity.
bool IsFollowing() const;Reset Rotation
Section titled “Reset Rotation”Reset camera rotation to north-facing (yaw = 0).
void ResetRotation();Focus On World Point
Section titled “Focus On World Point”Recenter the ground focus on a world point: moves the pivot’s XY immediately and lets ground-follow ease Z to the terrain there (smooth altitude transition, no pop). Preserves yaw / pitch / zoom; cancels any active follow. Use for minimap clicks etc. Only WorldPoint.XY is used — Z is resolved by ground-follow.
void FocusOnWorldPoint(FVector WorldPoint);Get Pivot Location
Section titled “Get Pivot Location”Get the current camera pivot world location.
FVector GetPivotLocation() const;Get Camera Yaw
Section titled “Get Camera Yaw”Get the current camera yaw in degrees.
float GetCameraYaw() const;Get Current Zoom Distance
Section titled “Get Current Zoom Distance”Get the current zoom distance.
float GetCurrentZoomDistance() const;Get Camera Pitch
Section titled “Get Camera Pitch”Get the current camera pitch in degrees.
float GetCameraPitch() const;Set Camera State
Section titled “Set Camera State”Snaps the camera to a pivot location, yaw, pitch and zoom distance in one call, with no easing. Use it to restore a saved view.
void SetCameraState(FVector PivotLocation, float Yaw, float Pitch, float ZoomDistance);Properties
Section titled “Properties”Camera Pivot
Section titled “Camera Pivot”TObjectPtr<USceneComponent> CameraPivot · default CreateDefaultSubobject<USceneComponent>(TEXT("CameraPivot"))
Read-only in Details · Blueprint read-only
Root pivot scene component — moves on the ground plane.
Spring Arm
Section titled “Spring Arm”TObjectPtr<USpringArmComponent> SpringArm · default CreateDefaultSubobject<USpringArmComponent>(TEXT("SpringArm"))
Read-only in Details · Blueprint read-only
Spring arm controlling zoom distance and pitch angle.
Camera Component
Section titled “Camera Component”TObjectPtr<UCameraComponent> CameraComponent · default CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"))
Read-only in Details · Blueprint read-only
Camera component attached to the spring arm.
Pan Speed
Section titled “Pan Speed”float PanSpeed · default 2000.0f
Editable in defaults and on instances · Blueprint read and write
Pan speed in units per second (WASD / edge scroll).
Enable Edge Scroll
Section titled “Enable Edge Scroll”bool bEnableEdgeScroll · default true
Editable in defaults and on instances · Blueprint read and write
Enable screen-edge scrolling.
Edge Scroll Margin
Section titled “Edge Scroll Margin”float EdgeScrollMargin · default 20.0f · shown when bEnableEdgeScroll · min 1
Editable in defaults and on instances · Blueprint read and write
Screen edge margin in pixels that triggers edge scroll.
Edge Scroll Speed Multiplier
Section titled “Edge Scroll Speed Multiplier”float EdgeScrollSpeedMultiplier · default 1.0f · shown when bEnableEdgeScroll · min 0.0
Editable in defaults and on instances · Blueprint read and write
Edge scroll speed multiplier relative to PanSpeed.
Rotation Speed
Section titled “Rotation Speed”float RotationSpeed · default 90.0f
Editable in defaults and on instances · Blueprint read and write
Keyboard rotation speed in degrees per second at full axis deflection (Q/E).
Zoom Min
Section titled “Zoom Min”float ZoomMin · default 500.0f · min 100.0
Editable in defaults and on instances · Blueprint read and write
Minimum zoom distance (closest to ground).
Zoom Max
Section titled “Zoom Max”float ZoomMax · default 5000.0f · min 100.0
Editable in defaults and on instances · Blueprint read and write
Maximum zoom distance (farthest from ground).
Zoom Step
Section titled “Zoom Step”float ZoomStep · default 200.0f
Editable in defaults and on instances · Blueprint read and write
Zoom step per scroll wheel tick.
Zoom Rate
Section titled “Zoom Rate”float ZoomRate · default 2500.0f
Editable in defaults and on instances · Blueprint read and write
Keyboard zoom speed in world units per second at full axis deflection (Z/X). Frame-rate independent, unlike the per-tick wheel ZoomStep.
Zoom Interp Speed
Section titled “Zoom Interp Speed”float ZoomInterpSpeed · default 10.0f · min 1.0
Editable in defaults and on instances · Blueprint read and write
Zoom interpolation speed (higher = snappier).
Default Zoom Distance
Section titled “Default Zoom Distance”float DefaultZoomDistance · default 2000.0f
Editable in defaults and on instances · Blueprint read and write
Default zoom distance at game start.
Camera Pitch
Section titled “Camera Pitch”float CameraPitch · default -50.0f
Editable in defaults and on instances · Blueprint read and write
Default spring arm pitch angle in degrees (negative = looking down).
Pitch Min
Section titled “Pitch Min”float PitchMin · default -85.0f · min -89.0, max -5.0
Editable in defaults and on instances · Blueprint read and write
Minimum pitch angle (most top-down, e.g., -85). Must be negative.
Pitch Max
Section titled “Pitch Max”float PitchMax · default -5.0f · min -89.0, max -5.0
Editable in defaults and on instances · Blueprint read and write
Maximum pitch angle (most flat/horizontal, e.g., -5). Must be negative.
Orbit Sensitivity
Section titled “Orbit Sensitivity”float OrbitSensitivity · default 0.3f
Editable in defaults and on instances · Blueprint read and write
Mouse rotate sensitivity in degrees per pixel of mouse movement, applied to both yaw (horizontal) and pitch (vertical). Scaled by the player controller’s Mouse Rotate Modifier.
Tilt Speed
Section titled “Tilt Speed”float TiltSpeed · default 45.0f
Editable in defaults and on instances · Blueprint read and write
Keyboard tilt speed in degrees per second at full axis deflection.
Enable Bounds
Section titled “Enable Bounds”bool bEnableBounds · default false
Editable in defaults and on instances · Blueprint read and write
Enable camera movement bounds.
World Bounds
Section titled “World Bounds”FBox WorldBounds · default FBox(FVector(-10000, -10000, -10000), FVector(10000, 10000, 10000)) · shown when bEnableBounds
Editable in defaults and on instances · Blueprint read and write
World-space bounding box for camera pivot. Only XY is enforced.
Ground Follow
Section titled “Ground Follow”bool bGroundFollow · default true
Editable in defaults and on instances · Blueprint read and write
Keep the camera’s ground-focus pivot on the terrain (traced down each tick) so the camera maintains a constant height ABOVE the ground instead of a fixed world Z. The spring arm provides the height; the pivot rides the terrain.
Ground Follow Interp Speed
Section titled “Ground Follow Interp Speed”float GroundFollowInterpSpeed · default 8.0f · shown when bGroundFollow · min 0.5
Editable in defaults and on instances · Blueprint read and write
How quickly the pivot’s Z eases toward the traced ground height. Higher = snappier vertical tracking, lower = floatier. Smooths both terrain panning and recenter snaps.
Ground Trace Object Type
Section titled “Ground Trace Object Type”TEnumAsByte<ECollisionChannel> GroundTraceObjectType · default ECC_WorldStatic · shown when bGroundFollow
Editable in defaults and on instances · Blueprint read and write
Object type the downward ground trace queries. WorldStatic = terrain + static meshes, ignoring dynamic units/pawns so the camera doesn’t bob over unit tops.
Ground Trace Extent
Section titled “Ground Trace Extent”float GroundTraceExtent · default 100000.0f · shown when bGroundFollow · min 100.0
Editable in defaults and on instances · Blueprint read and write
Half-length (world units) of the up/down ground trace from the pivot. Must clear the tallest terrain feature on the map.
C++ members (7)
void HandleMMBPanInput(const FVector2D& MouseDelta);Handle MMB pan input (direct mouse delta, moves pivot). Grab-the-ground style (inverted).void HandleOrbitInput(const FVector2D& MouseDelta);Handle mouse rotate input. X = yaw orbit, Y = pitch tilt (clamped); both axes per-pixel at OrbitSensitivity — no time scaling, a mouse delta already encodes its own magnitude.void HandlePanInput(const FVector2D& AxisValue);Called by the player controller when camera pan input is received.void HandleRotateInput(float YawDelta);Called by the player controller when camera rotate input is received (keyboard Q/E).void HandleTiltInput(float TiltDelta);Called by the player controller when keyboard camera tilt input is received. Adjusts the spring-arm pitch at TiltSpeed degrees/second, clamped to [PitchMin, PitchMax] — the keyboard twin of the orbit input’s Y axis.void HandleZoomInput(float ZoomDelta);Called by the player controller when mouse-wheel zoom input is received. Steps the target distance by ZoomStep per wheel tick (event-scaled).void HandleKeyZoomInput(float ZoomDelta);Called by the player controller when keyboard zoom input is received. Moves the target distance at ZoomRate units/second — the frame-rate- independent twin of the wheel’s per-tick HandleZoomInput.