Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / XRLocomotionSystem

Class: XRLocomotionSystem ​

Defined in: systems/XRLocomotionSystem.ts:34

Implements ​

Constructors ​

Constructor ​

ts
new XRLocomotionSystem(inputSystem): XRLocomotionSystem;

Defined in: systems/XRLocomotionSystem.ts:76

Parameters ​

ParameterType
inputSystemXRInputSystem

Returns ​

XRLocomotionSystem

Methods ​

setInteractionSystem() ​

ts
setInteractionSystem(interactionSystem): void;

Defined in: systems/XRLocomotionSystem.ts:72

Wire the interaction system so grabs suppress teleport on that hand.

Parameters ​

ParameterType
interactionSystemXRInteractionSystem | null

Returns ​

void


onWorldPause() ​

ts
onWorldPause(): void;

Defined in: systems/XRLocomotionSystem.ts:86

Stops with the game, but what it publishes doesn't: the teleport visual keeps drawing whatever curve was last left here. An aim also can't survive a pause, because update would read the stick letting go on the first frame back as a release, and commit a teleport nobody asked for.

Returns ​

void

Implementation of ​

EcsSystem.onWorldPause


onWorldResume() ​

ts
onWorldResume(): void;

Defined in: systems/XRLocomotionSystem.ts:97

A stick pushed during the pause isn't a push now, so it can't snap-turn.

Returns ​

void

Implementation of ​

EcsSystem.onWorldResume


update() ​

ts
update(world, deltaTime): void;

Defined in: systems/XRLocomotionSystem.ts:105

Parameters ​

ParameterType
worldWorld
deltaTimenumber

Returns ​

void

Implementation of ​

EcsSystem.update


getAimCurve() ​

ts
getAimCurve(): Vector3[];

Defined in: systems/XRLocomotionSystem.ts:456

Arc points up to the landing spot this frame; empty when not aiming.

Returns ​

Vector3[]


isAimValid() ​

ts
isAimValid(): boolean;

Defined in: systems/XRLocomotionSystem.ts:461

True when the aim lands on a valid teleport area.

Returns ​

boolean


getLandingPoint() ​

ts
getLandingPoint(): Vector3 | null;

Defined in: systems/XRLocomotionSystem.ts:466

Where the arc currently lands, or null when not aiming at a valid area.

Returns ​

Vector3 | null