Skip to main content

SpecsInteractionModule.InteractableOptions

Class

Options supplied when registering an interactable.

  • 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

Options supplied when registering an interactable.

Index

Example

const options = new SpecsInteractionModule.InteractableOptions();
options.targetingMode = SpecsInteractionModule.TargetingMode.DirectIndirect;
interaction.registerInteractable(script.getSceneObject(), [collider], options);

Constructors

Constructor

new InteractableOptions(): InteractableOptions

Returns

InteractableOptions

Properties

ignoreInteractionPlane

ignoreInteractionPlane: boolean

SPECS

When enabled, this Interactable ignores any parent InteractionPlane and factors into the cursor's position and targetingVisual. Use when the Interactable is parented for organization but not spatially within that plane.

Since

Lens Scripting Version 375

Default Value

false
@snapOS

includeCollidersInPhysics

includeCollidersInPhysics: boolean

SPECS

When enabled, this Interactable's colliders also participate in Lens Studio Physics: they collide with physics bodies and respond to Physics raycasts and overlap/collision events. Off by default; leave off when the colliders are only used for interaction to keep them out of the physics simulation.

Since

Lens Scripting Version 375

Default Value

false
@snapOS

layerMask

layerMask: LayerSet

SPECS

The layers this Interactable belongs to. A cast or probe hits it only when its queryMask shares a layer with this set, so an empty set makes the Interactable unhittable. Defaults to every supported layer, making the Interactable visible to all queries.

Only layers 0-63 are supported. Higher layers are ignored, including any from LayerSet.makeUnique, which never fall in that range.

Since

Lens Scripting Version 375

Default Value

LayerSet.all()
@snapOS

targetingMode

targetingMode: number

SPECS

How an interactor can interact with this Interactable, as a SpecsInteractionModule.TargetingMode bitmask. Combine bits with |.

Since

Lens Scripting Version 375

Default Value

SpecsInteractionModule.TargetingMode.DirectIndirect
@snapOS

targetingPriority

targetingPriority: TargetingPriority

SPECS

Targeting priority for this Interactable. Higher-priority Interactables are preferred over closer, lower-priority ones when an interactor targets.

Since

Lens Scripting Version 375

Default Value

SpecsInteractionModule.TargetingPriority.Normal
@snapOS

targetingVisual

targetingVisual: TargetingVisual

SPECS

The targeting visual shown while an interactor targets this Interactable.

Since

Lens Scripting Version 375

Default Value

SpecsInteractionModule.TargetingVisual.Cursor
@snapOS

Methods

getTypeName()

static getTypeName(): TypeName<InteractableOptions>

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

Since

Lens Scripting Version 375