Preparing search index...

    An InteractionPlane defines a zone which triggers near-field targeting logic for HandInteractors.

    Add an InteractionPlane to any 2D UI with high button density, such as ContainerFrame menus. Only one InteractionPlane should be added per UI (ContainerFrame adds one by default).

    • Far Field: Beyond nearFieldDepth - uses standard ray targeting
    • Near Field: Within nearFieldDepth (17cm default) - uses stabilized pinch locus
    • Physical Zone: Within physicalZoneDepth (3cm default) - enables poke and direct pinch
    • Behind Zone: Behind the plane - tolerance for push-through

    Entry and exit thresholds differ to prevent flickering at zone boundaries.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    api: Record<string, any>

    Generic object accessible by other instances of ScriptComponent. Use this object to store references to properties and methods that need to be accessible from other ScriptComponents.

    This property is no longer needed, you can use a reference to the ScriptComponent, including 'script', directly

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    enableDirectZone: boolean = true

    This property is no longer used.

    isEnabledInHierarchy: boolean

    Returns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.

    name: string
    sceneObject: SceneObject

    The SceneObject this component is on.

    targetingVisual: number = TargetingVisual.Cursor
    uniqueIdentifier: string
    updatePriority: number

    Accessors

    • get behindDistance(): number

      Returns number

      Use behindZoneDepth instead

    • set behindDistance(distance: number): void

      Parameters

      • distance: number

      Returns void

      Use behindZoneDepth instead

    • get behindZoneDepth(): number

      Returns the depth (cm) of the behind-plane tolerance zone.

      Returns number

    • set behindZoneDepth(depth: number): void

      Sets the depth (cm) of the behind-plane tolerance zone.

      Parameters

      • depth: number

      Returns void

    • get directZoneDistance(): number

      Returns number

      Use physicalZoneDepth instead

    • set directZoneDistance(distance: number): void

      Parameters

      • distance: number

      Returns void

      Use physicalZoneDepth instead

    • get directZoneExitDistance(): number

      Returns number

      Use physicalZoneExitDepth instead

    • set directZoneExitDistance(_distance: number): void

      Parameters

      • _distance: number

      Returns void

      Exit depth is now computed from physicalZoneDepth + hysteresis

    • get drawDebug(): boolean

      Returns if the interaction zone should be drawn via debug gizmos.

      Returns boolean

    • set drawDebug(enabled: boolean): void

      Sets if the interaction zone should be drawn via debug gizmos.

      Parameters

      • enabled: boolean

      Returns void

    • get lerpOffset(): number

      Returns number

      No longer used (always 0)

    • set lerpOffset(_distance: number): void

      Parameters

      • _distance: number

      Returns void

      No longer used

    • get nearFieldDepth(): number

      Returns the depth (cm) of the near-field zone.

      Returns number

    • set nearFieldDepth(depth: number): void

      Sets the depth (cm) of the near-field zone.

      Parameters

      • depth: number

      Returns void

    • get nearFieldEntryDistance(): number

      Returns number

      Use nearFieldDepth instead (entry threshold equals nearFieldDepth)

    • set nearFieldEntryDistance(distance: number): void

      Parameters

      • distance: number

      Returns void

      Set nearFieldDepth instead

    • get nearFieldExitDepth(): number

      Returns the depth (cm) at which near-field mode is exited (includes hysteresis).

      Returns number

    • get nearFieldExitDistance(): number

      Returns number

      Use nearFieldExitDepth instead

    • set nearFieldExitDistance(_distance: number): void

      Parameters

      • _distance: number

      Returns void

      Exit depth is now computed from nearFieldDepth + hysteresis

    • get normal(): vec3

      Returns the normal vector of the plane (local Z forward).

      Returns vec3

    • get offset(): vec3

      Returns the local-space offset of the interaction plane.

      Returns vec3

    • set offset(offset: vec3): void

      Sets the local-space offset of the interaction plane.

      Parameters

      Returns void

    • get physicalZoneDepth(): number

      Returns the depth (cm) of the physical interaction zone.

      Returns number

    • set physicalZoneDepth(depth: number): void

      Sets the depth (cm) of the physical interaction zone (poke/direct pinch).

      Parameters

      • depth: number

      Returns void

    • get physicalZoneExitDepth(): number

      Returns the depth (cm) at which physical mode is exited (includes hysteresis).

      Returns number

    • get planeOrigin(): vec3

      Returns the plane origin in world space (accounting for offset).

      Returns vec3

    • get planeSize(): vec2

      Returns the size (in world units) of the plane along the local X and Y axes.

      Returns vec2

    • set planeSize(size: vec2): void

      Sets the size (in world units) of the plane along the local X and Y axes.

      Parameters

      Returns void

    • get proximityDistance(): number

      Returns number

      Use nearFieldDepth instead

    • set proximityDistance(distance: number): void

      Parameters

      • distance: number

      Returns void

      Use nearFieldDepth instead

    • get up(): vec3

      Returns the up vector of the plane (local Y up).

      Returns vec3

    Methods

    • Check if a ray intersects the plane within its bounds.

      Parameters

      • rayStart: vec3

        Ray origin in world space

      • rayEnd: vec3

        Ray endpoint in world space

      • margin: number = 0

        Optional margin (cm) to extend the bounds check. Default 0.

      Returns boolean

      True if the ray intersects the plane within (planeSize + margin) bounds

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns void

    • Project a 3D point in world space onto the InteractionPlane.

      Parameters

      • point: vec3

        A 3D point in world space

      Returns ZoneProjection

      A ZoneProjection with the projected point and zone membership, or null if projection fails.

    • Returns void