Preparing search index...

    Class PinToMeshComponent

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

    Pin To Mesh guide.

    Hierarchy (View Summary)

    Index

    Properties

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    true
    
    isBeingDestroyed: boolean

    Returns true if this Component is currently being destroyed. Becomes true as soon as destruction begins via Component#destroy or destruction of its owning SceneObject, before any OnDestroyEvent callbacks fire.

    Lens Scripting Version 364

    if (!script.isBeingDestroyed) {
    // Component is still fully alive
    }
    isEnabledInHierarchy: boolean

    Returns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.

    offsetPosition: vec3

    The position offset to apply.

    (0, 0, 0)
    
    offsetRotation: vec3

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

    (0, 0, 0)
    
    orientation: Orientation

    The orientation type to use.

    PinToMeshComponent.Orientation.OnlyPosition
    
    pinUV: vec2

    The UV coordinates on the target mesh to attach to.

    (0, 0)
    
    preferedTriangle: number

    Use PinToMeshComponent.preferredTriangle instead.

    -1
    
    preferredTriangle: number

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

    -1
    
    preferredUVLayerIndex: number

    Index of the UV coordinate set to use for pinning.

    -1
    
    sceneObject: SceneObject

    The SceneObject this component is on.

    The target mesh to attach to.

    null
    
    uniqueIdentifier: string

    Lens Scripting Version 176

    useInterpolatedVertexNormal: boolean

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

    false
    

    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