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
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
IsRequestingFlight
Indicates whether the scout is requesting controlled flight.
public bool IsRequestingFlight
Field Value
IsRequestingJump
Indicates whether the scout is requesting to jump.
public bool IsRequestingJump
Field Value
IsRequestingSwim
Indicates whether the scout is requesting active swimming while traversing liquid.
public bool IsRequestingSwim
Field Value
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
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
RecordData(IChronicler)
Records the current instance state to the provided chronicler.
public void RecordData(IChronicler chronicler)
Parameters
chroniclerIChroniclerThe 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
directionVector3dThe movement direction vector to apply for the request.
rateTrekRateThe rate at which the movement should be performed.
isRequestingJumpbooltrue to request a jump action; otherwise, false.
isRequestingFlightbooltrue to request a flight action; otherwise, false.
isRequestingSwimbooltrue to request active swim control while in liquid; otherwise, false.
isRequestingClimbbooltrue to request a climb action; otherwise, false.
facingDirectionVector3d?An optional vector specifying the desired facing direction. If null or equal to Vector3d.Zero, the facing direction is not changed.
canAffordJumpbooltrue 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
originVector3dThe new origin position to set for the transient state.
footPositionVector3d?The foot position to set for the transient state, or null to leave it unset.
rotationFixedQuaternionThe rotation to apply to the transient state.
directionVector3d?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.