Lens Scripting API

    Class OverlapStayEventArgs

    Args used for ColliderComponent.onOverlapStay, which is triggered every frame while the collider continues overlapping another object. Typically used for volume triggers.

    // While the collider continues to overlap another collider, print information about the overlap

    // @input Physics.ColliderComponent collider

    script.collider.onOverlapStay.add(function (e) {
    var overlap = e.overlap;
    print("OverlapStay(" + overlap.id + "): Overlap with: " + overlap.collider.getSceneObject().name);
    });

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    currentOverlapCount: number

    Number of objects currently overlapping.

    currentOverlaps: Overlap[]

    Array of all current overlaps.

    overlap: Overlap

    Structure containing information about the current overlap.

    Methods

    • 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

    MMNEPVFCICPMFPCPTTAAATR