SpecsInteractionModule.SphereOverlapProbe
ClassAn OverlapProbe whose volume is a sphere.
- 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
Since Lens Scripting v375
An OverlapProbe whose volume is a sphere. enterRadius/exitRadius (cm) give hysteresis.
Create with SpecsInteractionModule#createSphereOverlapProbe.
Index
Properties
Methods
Extends
Properties
enterRadius
readonlyenterRadius:number
SPECS
The probe's enter radius, cm.
Since
Lens Scripting Version 375
exitRadius
readonlyexitRadius:number
SPECS
The probe's exit radius, cm.
Since
Lens Scripting Version 375
onOverlapEnter
readonlyonOverlapEnter:event1<OverlapEnterEventArgs,void>
SPECS
Signals at most once per frame with the colliders that entered the probe's enter volume that frame, delivered as the OverlapEnterEventArgs#enteredOverlaps batch. When a frame has both enters and exits, onOverlapEnter fires before OverlapProbe#onOverlapExit. Delivered after Update, prior to LateUpdate.
Since
Lens Scripting Version 375
Inherited from
onOverlapExit
readonlyonOverlapExit:event1<OverlapExitEventArgs,void>
SPECS
Signals at most once per frame with the colliders that left the probe's exit volume that frame, whose collider was removed while a member, or that were still inside when the probe itself was removed, delivered as the OverlapExitEventArgs#exitedOverlaps batch. Delivered after Update, prior to LateUpdate.
Since
Lens Scripting Version 375
Inherited from
queryMask
readonlyqueryMask:LayerSet
SPECS
The layers this probe matches against. A collider joins only when its Interactable's
layerMask shares a layer with this set. Only layers 0-63 are supported, so this reads back
without any layers above that range the probe was created with.
Since
Lens Scripting Version 375
Inherited from
Methods
destroy()
destroy():
void
SPECS
Stops the probe and drops it from active tracking. Any colliders still inside fire one final OverlapProbe#onOverlapExit shortly after. No further events follow. Idempotent.
Returns
void
Since
Lens Scripting Version 375
Inherited from
getTypeName()
staticgetTypeName():TypeName<SphereOverlapProbe>
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<SphereOverlapProbe>
Since
Lens Scripting Version 375
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
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
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
setRadii()
setRadii(
enterRadius,exitRadius):void
SPECS
Updates the probe's enter and exit radii (cm). exitRadius should be >= enterRadius;
equal values disable hysteresis. Applied at the next overlap evaluation, after Update and
before LateUpdate.
Parameters
| Parameter | Type |
|---|---|
enterRadius | number |
exitRadius | number |
Returns
void
Since
Lens Scripting Version 375