Skip to main content

SpecsInteractionModule.OverlapEnterEventArgs

Class

Args for OverlapProbe#onOverlapEnter, delivered once per frame: enteredOverlaps, every membership that entered the probe's volume this frame.

  • Snapchat: not supported
  • SPECS: fully supported
  • Camera Kit Web: not supported
  • Camera Kit Mobile: not supported
  • SnapchatNot supported — Available on SPECS only
  • SPECSFully supported
  • Camera Kit WebNot supported — Available on SPECS only
  • Camera Kit MobileNot supported — Available on SPECS only

Platform details

  • Snapchat — Not supported — Available on SPECS only.

  • SPECS — Fully supported.

  • Camera Kit Web — Not supported — Available on SPECS only.

  • Camera Kit Mobile — Not supported — Available on SPECS only.

Since Lens Scripting v375

Args for OverlapProbe#onOverlapEnter, delivered once per frame: enteredOverlaps, every membership that entered the probe's volume this frame. To track the full set currently inside, keep a collection keyed by Overlap#id, adding on enter and removing on OverlapExitEventArgs#exitedOverlaps.

Index

Example

probe.onOverlapEnter.add(function (args) {
for (var i = 0; i < args.enteredOverlaps.length; i++) {
print("entered " + args.enteredOverlaps[i].id);
}
});

Extends

Properties

enteredOverlaps

readonly enteredOverlaps: Overlap[]

SPECS

Every Overlap that entered the probe's volume this frame, sorted by Overlap#id. Membership is sampled once per frame, so a collider that enters and leaves between two samples is never reported. Anything reported here later appears in OverlapExitEventArgs#exitedOverlaps on the frame it leaves.

Since

Lens Scripting Version 375

Methods

getTypeName()

static getTypeName(): TypeName<OverlapEnterEventArgs>

SPECS

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

TypeName<OverlapEnterEventArgs>

Since

Lens Scripting Version 375

Overrides

ScriptObject.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

ScriptObject.getTypeName


isOfType()

isOfType(type): boolean

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

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

ScriptObject.isOfType


isSame()

isSame(other): boolean

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

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

ScriptObject.isSame