Skip to content

Sein Mover Handle

Class · USeinMoverHandle : UObject

#include "Movement/SeinMoverHandle.h"

deterministic: safe in simulation code

The unit a movement mode’s hook is working on. Every node reads the unit, probes the navigation or runs a math helper bound to this unit and tick, except Resolve Avoidance, which updates only this unit’s avoidance memory, and Set Render Value. A hook marked Thread Safe may use every node but Query Nav Direction and run in the parallel step. The handle is valid only during the hook call that received it: never store it.

Movement

True during a movement tick. False in On Move End, where only the pose reads work.

bool IsValidMover() const;

The unit’s world position.

FFixedVector GetLocation() const;

The unit’s world rotation.

FFixedQuaternion GetRotation() const;

The facing in radians around the up axis.

FFixedPoint GetYaw() const;

The planar velocity the unit drove last tick, which carries across orders.

FFixedVector GetVelocity() const;

How fast the unit travels this tick: Movement Data’s Speed times the terrain speed multiplier under it. A mode with an acceleration ramp treats it as its top speed.

FFixedPoint GetSpeed() const;

How fast the unit can turn, in radians per second.

FFixedPoint GetTurnRate() const;

The clearance the unit’s body needs, from its Extents or its navigation footprint, the same radius collision and pathfinding use.

FFixedPoint GetFootprintRadius() const;

This mode’s Get Altitude for the unit: how far above the ground it rides.

FFixedPoint GetAltitude() const;

The length of this simulation tick, in seconds.

FFixedPoint GetDeltaTime() const;

The terrain speed multiplier under the unit (1 normal, below 1 slow ground, above 1 roads), already in Get Speed.

FFixedPoint GetTerrainSpeedMultiplier() const;

How close to the destination counts as arrived.

FFixedPoint GetAcceptanceRadius() const;

Where the move ends: the route’s final waypoint, or the unit’s location without a route.

FFixedVector GetDestination() const;

The planar distance from the unit to its destination.

FFixedPoint GetDistanceToDestination() const;

How many waypoints the current route has. 0 when there is no route.

int32 GetWaypointCount() const;

The waypoint the unit is heading for. The harness advances it past waypoints the unit reaches.

int32 GetCurrentWaypointIndex() const;

The waypoint at an index, or zero outside the route.

FFixedVector GetWaypoint(int32 Index) const;

The position of the waypoint the unit is heading for. Zero outside the route.

FFixedVector GetCurrentWaypoint() const;

How many typed segments the route has. On a plain route each is a Straight between two waypoints; on a typed route (arcs, pivots, reverse legs) the segments are the planned truth and the waypoints a finer polyline flattened from them, so never index one by the other.

int32 GetSegmentCount() const;

The typed segment at an index: its kind, endpoints, arc geometry, target yaw and reverse flag. An empty Straight segment outside the route.

FSeinPathSegment GetSegment(int32 Index) const;

The movers with a collider within Radius of this unit this tick, nearest first, from the movement snapshot. Empty outside a movement step.

TArray<FSeinNearbyMover> GetNearbyMovers(FFixedPoint Radius) const;

The velocity to drive after avoiding other movers, from the velocity this mode wants. Asks the project’s avoidance (Movement settings) with this unit’s speed and turn rate. Hold is true, and the velocity zero, when it should give way: set the motion’s Hold to wait without the move counting it as lack of progress. With avoidance off it returns Preferred Velocity.

FFixedVector ResolveAvoidance(FFixedVector PreferredVelocity, bool& bHold) const;

Stores a value for the render and animation layer under a tag of your choosing (a bank angle, a tread speed); read it with Get Movement Render Value. Presentation only: render values are not simulation state and are not saved. Works in the step hooks and On Move Begin; On Move End has no Movement Data to write, so clear a value in Compute Idle Motion.

void SetRenderValue(FGameplayTag Key, FFixedPoint Value) const;

Movement / Navigation

Tests a straight line across the static navigation: true when something blocks it, with Out Hit Point the first blocked spot.

bool NavRaycast(const FFixedVector& From, const FFixedVector& To, FFixedVector& OutHitPoint) const;

The ground height at a position; false without navigation data there. Walkable Only ignores blocked cells, as a ground unit does; off reads the top of any cell, as a flyer does.

bool SampleGroundHeight(const FFixedVector& WorldPos, bool bWalkableOnly, FFixedPoint& OutHeight) const;

The terrain type index at a position (0 = none).

int32 GetTerrainTypeAt(const FFixedVector& WorldPos) const;

The terrain tag at a position (for example Terrain.Road); empty where there is no terrain.

FGameplayTag GetTerrainTagAt(const FFixedVector& WorldPos) const;

Whether this unit could stand at a position now: walkable and clear of static and dynamic blockers for its footprint and layers.

bool IsPositionClear(const FFixedVector& WorldPos) const;

The planar direction from this unit toward Goal, as the navigation answers it: a field navigation reads its direction field; the shipped grid navigation routes. Zero means stop. Group Id lets a shared-field navigation reuse one field across a group (0 = alone). Not thread safe, because the grid navigation searches on the game thread: a mode whose step calls it steps serially.

Defaults: GroupId = 0.

FFixedVector QueryNavDirection(FFixedVector Goal, int64 GroupId = 0) const;

Movement / Math

Eases a speed toward a target over this tick, speeding up at Acceleration and slowing at Deceleration.

FFixedPoint StepSpeedToward(FFixedPoint Current, FFixedPoint Target, FFixedPoint Acceleration, FFixedPoint Deceleration) const;

The fastest the unit can go and still stop within Distance To Stop at Deceleration. Zero or less Deceleration means no limit and returns a very large value.

FFixedPoint GetArrivalSpeedCap(FFixedPoint DistanceToStop, FFixedPoint Deceleration) const;

The shortest turn from one angle to another, in radians between minus pi and pi.

FFixedPoint ShortestAngleDelta(FFixedPoint From, FFixedPoint To) const;

Eases an angle toward a target, turning no more than Max Rate Per Sec this tick.

FFixedPoint SmoothAngleToward(FFixedPoint Current, FFixedPoint Target, FFixedPoint MaxRatePerSec) const;

The point Look Ahead along the route ahead of the unit: the target to steer toward for smooth path following.

FFixedVector GetLookAheadPoint(FFixedPoint LookAhead) const;
C++ members (3)
  • void SetContext(const FSeinMovementContext* InCtx); The owning mode points the handle at the live context for each hook call, or at the entity alone for On Move End.
  • const FSeinMovementContext* GetContext() const;
  • void SetEntityOnly(FSeinEntity* InEntity);