Skip to main content

Function: stepLocomotion()

function stepLocomotion(
state: LocomotionState,
input: MoveInput,
delta: number,
options?: LocomotionOptions,
yaw?: number
): LocomotionState;

Defined in: xrblocks-uiextensions/src/desktop-locomotion.ts:124

Advance the locomotion state by delta seconds.

Horizontal movement is direct (no inertia - precise for UI testing); vertical motion is a simple ballistic arc over the stance height, so jumping while crouched jumps from the lower stance as expected. Mutates and returns state.

Parameters

ParameterTypeDefault value
stateLocomotionStateundefined
inputMoveInputundefined
deltanumberundefined
optionsLocomotionOptionsDEFAULT_LOCOMOTION
yawnumber0

Returns

LocomotionState