Interface XrTeleportationOptions
blockAllPickableMeshes?: boolean;
blockedColor?: readonly [number, number, number];
blockerPredicate?: (mesh: Mesh) => boolean;
color?: readonly [number, number, number];
floorMeshes?: readonly Mesh[];
floorPredicate?: (mesh: Mesh) => boolean;
gravity?: number;
maxLength?: number;
parabolaSpeed?: number;
parabolic?: boolean;
pickBlockerMeshes?: readonly Mesh[];
rotateToDirection?: boolean;
rotationAngle?: number;
snapTurn?: boolean;
thumbstickThreshold?: number;
}
Properties
Optionalblock All Pickable Meshes
Treat every pickable mesh that isn't floor as a blocker, so you can't teleport through
or past solid geometry. Default false.
Optionalblocked Color
Arc tint while the aim is blocked. Default red [1, 0.25, 0.25] (Babylon blocked-ray red).
Optionalblocker Predicate
Predicate selecting blocker meshes (in addition to pickBlockerMeshes).
Optionalcolor
Reticle + arc tint while aiming at valid floor. Default Babylon teleport blue.
Optionalfloor Meshes
Meshes that count as teleportable floor. A ray only teleports when it lands on one of these. Mutually exclusive with floorPredicate.
Optionalfloor Predicate
Predicate selecting teleportable floor meshes (alternative to floorMeshes). When neither is given, any surface whose world normal points roughly up is floor.
Optionalgravity
Downward acceleration (m/s²) applied to the parabolic arc. Default 9.8.
Optionalmax Length
Max horizontal reach of the aim arc in metres. Default 20.
Optionalparabola Speed
Launch speed (m/s) of the parabolic arc — higher flattens it, lower curves it more.
Only affects arc shape, not reach. Default 7.
Optionalparabolic
Parabolic aim arc (curves down under gravity so you can aim up/down onto floors at
other heights). Set false for a straight ray. Default true.
Optionalpick Blocker Meshes
Meshes that BLOCK the teleport ray (e.g. walls): aiming so the arc lands on one shows the arc in blockedColor and refuses to teleport, even if the surface would otherwise read as floor. Explicit blockers win over the floor test. Combine with blockerPredicate / blockAllPickableMeshes.
Optionalrotate To Direction
Let the stick's left/right lean set the heading you face after teleporting, previewed
by a floor arrow. Default true.
Optionalrotation Angle
Snap-turn step in radians. Default Math.PI / 4 (45°).
Optionalsnap Turn
Enable thumbstick left/right snap-turn (when not aiming). Default true.
Optionalthumbstick Threshold
Thumbstick magnitude past which forward = aim and sideways = turn. Default 0.7.
Options for teleportation / createXrTeleportation.