Table of Contents

Struct TrekRequest

Namespace
Trailblazer.Navigation.Motor
Assembly
Trailblazer.dll

Represents a movement request for a object to pass to NavMotor, containing the current origin, foot position, rotation, direction, speed, and frame-owned locomotion intent.

public struct TrekRequest : IRecordable
Implements
IRecordable
Inherited Members

Constructors

TrekRequest()

Initializes a new instance of the TrekRequest class with default values.

public TrekRequest()

Fields

CanAffordJump

Per-frame host query result that authoritatively answers whether jump may spend host-owned resources this frame.

public bool CanAffordJump

Field Value

bool

Direction

Normalized distance of movement

public Vector3d Direction

Field Value

Vector3d

FacingDirection

Optional world-space facing direction that overrides the default "face movement" behavior for this request.

public Vector3d? FacingDirection

Field Value

Vector3d?

FootPosition

The position of the scout's foot in world space, used for ground detection and platform interaction.

public Vector3d? FootPosition

Field Value

Vector3d?

IsRequestingClimb

Indicates whether the scout is requesting climb engagement or continuation.

public bool IsRequestingClimb

Field Value

bool

IsRequestingFlight

Indicates whether the scout is requesting controlled flight.

public bool IsRequestingFlight

Field Value

bool

IsRequestingJump

Indicates whether the scout is requesting to jump.

public bool IsRequestingJump

Field Value

bool

IsRequestingSwim

Indicates whether the scout is requesting active swimming while traversing liquid.

public bool IsRequestingSwim

Field Value

bool

Origin

The world position from which the scout is requesting movement.

public Vector3d Origin

Field Value

Vector3d

Rate

The speed at which the scout wants to move.

public TrekRate Rate

Field Value

TrekRate

Rotation

The desired rotation of the scout in world space, used for orientation and facing direction.

public FixedQuaternion Rotation

Field Value

FixedQuaternion

Methods

Clone()

Creates a deep copy of the current TrekRequest instance.

public TrekRequest Clone()

Returns

TrekRequest

RecordData(IChronicler)

Records the current instance state to the provided chronicler.

public void RecordData(IChronicler chronicler)

Parameters

chronicler IChronicler

The active chronicler pass.

Reset()

Resets the per-frame movement data.

public void Reset()

ResetTransient()

Resets only the transient movement data that should be cleared each frame, while preserving any persistent data that may be set externally.

public void ResetTransient()

SetRequest(Vector3d, TrekRate, bool, bool, bool, bool, Vector3d?, bool)

Sets the current movement request parameters, including direction, rate, and action flags such as jump, flight, swim, and climb.

public void SetRequest(Vector3d direction, TrekRate rate, bool isRequestingJump, bool isRequestingFlight, bool isRequestingSwim, bool isRequestingClimb, Vector3d? facingDirection = null, bool canAffordJump = true)

Parameters

direction Vector3d

The movement direction vector to apply for the request.

rate TrekRate

The rate at which the movement should be performed.

isRequestingJump bool

true to request a jump action; otherwise, false.

isRequestingFlight bool

true to request a flight action; otherwise, false.

isRequestingSwim bool

true to request active swim control while in liquid; otherwise, false.

isRequestingClimb bool

true to request a climb action; otherwise, false.

facingDirection Vector3d?

An optional vector specifying the desired facing direction. If null or equal to Vector3d.Zero, the facing direction is not changed.

canAffordJump bool

true if the jump action can be afforded; otherwise, false. Defaults to true.

SetTransientState(Vector3d, Vector3d?, FixedQuaternion, Vector3d?)

Sets the transient state for the current frame, including origin, optional foot position, rotation, and optionally direction.

public void SetTransientState(Vector3d origin, Vector3d? footPosition, FixedQuaternion rotation, Vector3d? direction)

Parameters

origin Vector3d

The new origin position to set for the transient state.

footPosition Vector3d?

The foot position to set for the transient state, or null to leave it unset.

rotation FixedQuaternion

The rotation to apply to the transient state.

direction Vector3d?

The direction to set for the transient state, or null to preserve the existing direction.

Remarks

If direction is null, the current direction is retained for this frame. This method is intended for per-frame updates where only some state components may change.