Lens Scripting API

    Class PinToMeshComponent

    Attaches the SceneObject to the mesh surface of a specific RenderMeshVisual.

    Pin To Mesh guide.

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    offsetPosition: vec3

    The position offset to apply.

    offsetRotation: vec3

    The euler angle offset to apply. Only has an effect when orientation is set to PositionAndDirection.

    orientation: Orientation

    The orientation type to use.

    pinUV: vec2

    The UV coordinates on the target mesh to attach to.

    preferedTriangle: number
    preferredTriangle: number

    The preferred triangle index to attach to when multiple triangles contain the desired UV coordinate.

    preferredUVLayerIndex: number

    Index of the UV coordinate set to use for pinning.

    sceneObject: SceneObject

    The scene object this component is on.

    The target mesh to attach to.

    uniqueIdentifier: string
    useInterpolatedVertexNormal: boolean

    If enabled, interpolated vertex normals will be used when calculating the attachment position.

    Methods

    • Destroys the component.

      Returns void

    • Returns the name of this object's type.

      Returns string

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

      Parameters

      • type: string

      Returns boolean

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

      Parameters

      Returns boolean

    MMNEPVFCICPMFPCPTTAAATR