Skip to content

@relu-interactives/spatial-ecs


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

Function: sampleTeleportArc() ​

ts
function sampleTeleportArc(
   origin, 
   direction, 
   out?, 
   options?): Vector3[];

Defined in: xr/teleportArc.ts:31

Sample a ballistic curve starting at origin heading along direction.

Returns points in world space, oldest first. The caller raycasts consecutive pairs to find where the arc meets a teleport surface — sampling and intersection are kept separate so this stays testable.

Parameters ​

ParameterTypeDefault value
originVector3undefined
directionVector3undefined
outVector3[][]
options?{ speed?: number; gravity?: number; steps?: number; maxTime?: number; }undefined
options.speed?numberundefined
options.gravity?numberundefined
options.steps?numberundefined
options.maxTime?numberundefined

Returns ​

Vector3[]