Preparing search index...

    One collider inside an overlap probe's volume, with an id stable from the enter to the exit of that membership. Delivered via OverlapEnterEventArgs#enteredOverlaps and OverlapExitEventArgs#exitedOverlaps.

    Lens Scripting Version 375

    probe.onOverlapEnter.add(function (args) {
    args.enteredOverlaps.forEach(function (overlap) {
    if (overlap.collider) {
    print("entered " + overlap.id + ": " + overlap.collider.getSceneObject().name);
    }
    });
    });

    Hierarchy (View Summary)

    Index

    Properties

    The collider. Null in OverlapProbe#onOverlapExit if the collider was destroyed while a member; use Overlap#id to correlate the exit with its enter.

    Lens Scripting Version 375

    distance: number

    Closest-point distance from the collider's volume to the probe center, in centimeters; 0 when the probe center is inside the collider. -1 unless the probe was created with SpecsInteractionModule.OverlapProbeOptions#trackDistances enabled.

    This Overlap is a live view, not a snapshot: while the collider stays inside a distance-tracking probe, the value refreshes in place once per frame at the probe's overlap evaluation (after Update, before LateUpdate), so read it in LateUpdate for current-frame-accurate results. Retain the Overlap from OverlapProbe#onOverlapEnter and poll this property; it resets to -1 when the membership exits (including during the OverlapProbe#onOverlapExit callback), so a retained Overlap never reads as still-near after leaving.

    Lens Scripting Version 375

    id: number

    Identifies this membership, stable from its enter to its exit and unique among the probe's concurrent memberships. Use it to pair an exit with its enter.

    Lens Scripting Version 375

    Methods

    • Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

      Returns string

      Lens Scripting Version 375

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

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean