Skip to content

@relu-interactives/spatial-ecs


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

Class: XRHitTestSystem ​

Defined in: systems/XRHitTestSystem.ts:57

Implements ​

Constructors ​

Constructor ​

ts
new XRHitTestSystem(): XRHitTestSystem;

Returns ​

XRHitTestSystem

Properties ​

PropertyModifierTypeDefault valueDescriptionDefined in
runsWhilePausedreadonlytruetrueKeep ticking while the world is paused. Leave it unset for anything that moves the game on: such a system stops at world.pause() and picks up where it was at world.resume().systems/XRHitTestSystem.ts:58

Methods ​

update() ​

ts
update(world): void;

Defined in: systems/XRHitTestSystem.ts:66

Parameters ​

ParameterType
worldWorld

Returns ​

void

Implementation of ​

EcsSystem.update


getHitResult() ​

ts
getHitResult(target?): XrHitResult | null;

Defined in: systems/XRHitTestSystem.ts:121

Where the given ray meets the real world this frame, or null.

Null is the normal case, not an error: the source may still be being requested, the ray may point at nothing recognised, or the runtime may not have granted hit-test at all.

Parameters ​

ParameterTypeDefault value
targetTargetKey"viewer"

Returns ​

XrHitResult | null


dispose() ​

ts
dispose(): void;

Defined in: systems/XRHitTestSystem.ts:188

Returns ​

void

Implementation of ​

EcsSystem.dispose