PinToMeshComponent
Lens Studio v1.7.0+
Scripting Name: Component.PinToMeshComponent
Inherits from Component
Inner Classes: PinToMeshComponent.Orientation
Description
Attaches the SceneObject to the mesh surface of a different SceneObject. See the Pin To Mesh guide for more information.
Properties
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
: PinToMeshComponent.Orientation
The orientation type to use.
pinUV
: vec2
The UV coordinates on the target mesh to attach to.
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.
target
: BaseMeshVisual
The target mesh to attach to.
useInterpolatedVertexNormal
: Boolean
If enabled, interpolated vertex normals will be used when calculating the attachment position.
Inherited Methods
destroy()
: void
Destroys the component.
getSceneObject()
: SceneObject
Returns the SceneObject the component is attached to.
getTransform()
: Transform
Returns the Transform this component is attached to.
isSame(SerializableWithUID other)
: Boolean
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
getTypeName()
: String
Returns the name of this object’s type.
isOfType(String type)
: Boolean
Returns true if the object matches or derives from the passed in type.
Inherited Properties
enabled
: Boolean
If disabled, the Component will stop enacting its behavior.
Still Looking for help?
Visit Support