SpecsInteractionModule.InteractionPlaneOptions
ClassOptions supplied when registering an interaction plane.
- 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
Options supplied when registering an interaction plane.
Index
Properties
Methods
Example
const options = new SpecsInteractionModule.InteractionPlaneOptions();
options.planeSize = new vec2(20, 20);
interaction.registerInteractionPlane(script.getSceneObject(), options);
Constructors
Constructor
new InteractionPlaneOptions():
InteractionPlaneOptions
Returns
InteractionPlaneOptions
Properties
behindZoneDepth
behindZoneDepth:
number
SPECS
The depth (in centimeters) of the tolerance zone behind the plane. Interactions are still detected when the hand accidentally pushes through the plane, up to this distance.
Since
Lens Scripting Version 375
Default Value
15
@snapOS
nearFieldDepth
nearFieldDepth:
number
SPECS
The depth (in centimeters) of the near-field interaction zone along the plane's local Z axis. A hand within this distance in front of the plane uses near-field targeting; beyond it, standard far-field ray targeting applies. Exiting the zone uses a slightly larger threshold than entering to prevent flickering at the boundary.
Since
Lens Scripting Version 375
Default Value
17
@snapOS
offset
offset:
vec3
SPECS
Local-space offset of the plane. Allows positioning the effective interaction plane relative to the host SceneObject.
Since
Lens Scripting Version 375
Default Value
(0, 0, 0)
@snapOS
physicalZoneDepth
physicalZoneDepth:
number
SPECS
The depth (in centimeters) of the physical interaction zone in front of the plane. Within this distance, physical interactions (poke and direct pinch) are enabled. Exiting the zone uses a slightly larger threshold than entering to prevent flickering at the boundary.
Since
Lens Scripting Version 375
Default Value
3
@snapOS
planeSize
planeSize:
vec2
SPECS
The size of the interaction plane along the local X and Y axes. Defines the rectangular area of the plane where hand interactions are detected. Larger values create a bigger interactive surface area.
Since
Lens Scripting Version 375
Default Value
(10, 10)
@snapOS
targetingVisual
targetingVisual:
TargetingVisual
SPECS
The targeting visual shown while an interactor targets this InteractionPlane.
Since
Lens Scripting Version 375
Default Value
SpecsInteractionModule.TargetingVisual.Cursor
@snapOS
Methods
getTypeName()
staticgetTypeName():TypeName<InteractionPlaneOptions>
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<InteractionPlaneOptions>
Since
Lens Scripting Version 375