Skip to main content

SpecsInteractionModule.OverlapExitEventArgs

Class

Args for OverlapProbe#onOverlapExit, delivered once per frame: exitedOverlaps, every membership that left the probe's volume this frame (or whose collider wa…

  • 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#onOverlapExit, delivered once per frame: exitedOverlaps, every membership that left the probe's volume this frame (or whose collider was removed while a member, or that remained when the probe itself was removed). To track the full set currently inside, keep a collection keyed by Overlap#id, adding on OverlapEnterEventArgs#enteredOverlaps and removing on exit.

Index

Example

probe.onOverlapExit.add(function (args) {
for (var i = 0; i < args.exitedOverlaps.length; i++) {
print("exited " + args.exitedOverlaps[i].id);
}
});

Extends

Properties

exitedOverlaps

readonly exitedOverlaps: Overlap[]

SPECS

Every Overlap that left the probe's volume this frame, sorted by Overlap#id. A collider's Overlap#collider may be null if it was destroyed while a member; use Overlap#id to correlate the exit with its enter.

Since

Lens Scripting Version 375

Methods

getTypeName()

static getTypeName(): TypeName<OverlapExitEventArgs>

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

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