Table of Contents

Class JumpLocomotion

Namespace
Trailblazer.Navigation.Motor
Assembly
Trailblazer.dll

Handles the scout’s jumping mechanics, including jump height, cooldown, and movement control while airborne.

public class JumpLocomotion : ILocomotion, ITransient, IRecordable
Inheritance
JumpLocomotion
Implements
IRecordable
Inherited Members
Extension Methods

Remarks

This locomotion component determines how high the scout can jump, how much control they retain mid-air, and enforces a cooldown period between consecutive jumps.

Constructors

JumpLocomotion()

public JumpLocomotion()

Fields

AvoidGroundingTimer

The duration after jumping where ground detection is temporarily disabled.

public Fixed64 AvoidGroundingTimer

Field Value

Fixed64

BaseJumpHeight

The base height the scout can jump when the button is pressed briefly.

public Fixed64 BaseJumpHeight

Field Value

Fixed64

CooldownTime

The cooldown time before another jump can be performed.

public Fixed64 CooldownTime

Field Value

Fixed64

DefaultAvoidGroundingTimer

The default duration after jumping during which ground checks should be ignored.

public static readonly Fixed64 DefaultAvoidGroundingTimer

Field Value

Fixed64

DefaultBaseJumpHeight

The default base jump height, representing how high the scout jumps when pressing and immediately releasing the jump button.

public static readonly Fixed64 DefaultBaseJumpHeight

Field Value

Fixed64

DefaultCooldownTime

The default cooldown time after a jump before the scout can jump again.

public static readonly Fixed64 DefaultCooldownTime

Field Value

Fixed64

DefaultExtraJumpHeight

The additional height added when the jump button is held longer.

public static readonly Fixed64 DefaultExtraJumpHeight

Field Value

Fixed64

DefaultJumpControlMultiplier

Determines how much movement input affects the scout while jumping.

public static readonly Fixed64 DefaultJumpControlMultiplier

Field Value

Fixed64

DefaultPerpendicularJumpAmount

Determines how much the scout's jump direction is influenced by the slope of the surface they are on.

public static readonly Fixed64 DefaultPerpendicularJumpAmount

Field Value

Fixed64

DefaultSteepPerpendicularJumpAmount

Determines how much the scout's jump direction is influenced by steep slopes.

public static readonly Fixed64 DefaultSteepPerpendicularJumpAmount

Field Value

Fixed64

ExtraJumpHeight

Additional height gained when holding the jump button.

public Fixed64 ExtraJumpHeight

Field Value

Fixed64

JumpControlMultiplier

Controls how much movement input affects the scout while jumping. Lower values reduce movement responsiveness.

public Fixed64 JumpControlMultiplier

Field Value

Fixed64

MaxJumpCount

Maximum number of consecutive jumps allowed (e.g., 2 = double jump).

public int MaxJumpCount

Field Value

int

PerpendicularJumpAmount

Controls how much the scout jumps out perpendicular to the surface on walkable terrain. A value of 0 means fully vertical, and 1 means fully perpendicular.

public Fixed64 PerpendicularJumpAmount

Field Value

Fixed64

SteepPerpendicularJumpAmount

Controls how much the scout jumps out perpendicular to the surface on steep terrain. A value of 0 means fully vertical, and 1 means fully perpendicular.

public Fixed64 SteepPerpendicularJumpAmount

Field Value

Fixed64

Properties

CanJump

Returns true if more jumps are allowed.

public bool CanJump { get; }

Property Value

bool

CooldownTimer

The elapsed time in the cooldown state.

[Transient]
public Fixed64 CooldownTimer { get; }

Property Value

Fixed64

FrameJumpDirection

The direction in which the scout jumped during the current frame.

[Transient]
public Vector3d FrameJumpDirection { get; set; }

Property Value

Vector3d

IsCoolingDown

Indicates whether the scout is currently in a jump cooldown period.

[Transient]
public bool IsCoolingDown { get; }

Property Value

bool

IsEnabled

Indicates whether this locomotion behavior is enabled. If disabled, its movement effects will not be applied.

public bool IsEnabled { get; set; }

Property Value

bool

IsHoldingJump

Indicates whether the scout is holding the jump button.

[Transient]
public bool IsHoldingJump { get; set; }

Property Value

bool

IsJumping

Indicates whether the scout is currently performing a jump.

[Transient]
public bool IsJumping { get; set; }

Property Value

bool

Remarks

This is true if the jump button was pressed and the scout is not grounded.

JumpCount

The current number of jumps performed since the last grounding.

[Transient]
public int JumpCount { get; }

Property Value

int

JumpStartTime

The simulation frame when the scout started jumping.

[Transient]
public Fixed64 JumpStartTime { get; set; }

Property Value

Fixed64

Methods

RecordData(IChronicler)

Records the current instance state to the provided chronicler.

public void RecordData(IChronicler chronicler)

Parameters

chronicler IChronicler

The active chronicler pass.

RegisterJump()

Increments the jump counter.

public void RegisterJump()

ResetJumpCounter()

Resets jump state upon grounding.

public void ResetJumpCounter()

StartCooldown()

Starts the jump cooldown period, preventing another jump until the cooldown expires.

public void StartCooldown()

UpdateCooldown()

Updates the jump cooldown timer, resetting the jump state when the cooldown expires.

public void UpdateCooldown()