Lens Scripting API
    Preparing search index...

    Class OverlapEnterEventArgs

    Args used for ColliderComponent.onOverlapEnter, which is triggered when the collider begins overlapping another object. Typically used for volume triggers.

    // When the collider begins to overlap another collider, print information about the overlap

    // @input Physics.ColliderComponent collider

    script.collider.onOverlapEnter.add(function (e) {
    var overlap = e.overlap;
    print("OverlapEnter(" + 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