import { Behaviour } from "../Component.js"; /** * Marks a GameObject as a valid teleportation target for VR locomotion. * Add this component to objects or surfaces where users should be able to teleport. * * **How targeting works (important):** * The teleport ray uses a **visual raycast against rendered meshes** — NOT physics colliders. * When {@link XRControllerMovement.useTeleportTarget} is enabled, the controller ray is cast * against the rendered scene and the hit object (or any of its parents) is checked for a * `TeleportTarget` component. You can only teleport onto an object if that object, or one of * its ancestors, has this component. * * **Requirements for a target to be hittable:** * - It MUST have a visible, rendered mesh (a `MeshRenderer` / geometry). The ray hits the * rendered geometry directly. * - **A collider is NOT required.** Teleport does not use physics colliders — adding a * `BoxCollider` (or any collider) has no effect on whether the target can be teleported to. * - It must NOT be on the IgnoreRaycast layer (three.js layer 2) and must not have * `raycastAllowed` / `visible` set to false, otherwise the ray skips it. * - The `TeleportTarget` component may be on the hit mesh itself or on any parent * (resolved via `getComponentInParent`). * * **Setup:** * 1. Add this component to GameObjects (with a visible mesh) that should be teleport destinations * 2. Enable "Use Teleport Target" on the {@link XRControllerMovement} component so teleporting * is restricted to objects carrying this component * 3. Test teleportation in VR mode * * @example * ```ts * // Make a platform teleportable (the platform already has a visible mesh) * const platform = myPlatform.addComponent(TeleportTarget); * ``` * * @summary Marker component for valid VR teleportation destinations (mesh hit-test, no collider needed) * @category XR * @group Components * @see {@link XRControllerMovement} for VR locomotion and teleport configuration * @see {@link WebXR} for general WebXR setup */ export declare class TeleportTarget extends Behaviour { }