Lens Scripting API

    Class Overlap

    Exposes state generated for ColliderComponent overlap events.

    // 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

    Methods

    Constructors

    Properties

    The collider which is overlapping.

    id: number

    ID of the overlap, unique for this 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