Pin to Mesh
The Pin to Mesh component allows you to attach one object to another object's mesh surface.
note
- Pin to Mesh requires TikTok app version 30.3.0 or higher.
- Pin To Mesh currently faces limitations when used with 3D Face.
![pin to mesh demo](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/pin_to_mesh_demo-181c873f0025f4c0d7a32fceccca2005.gif)
Pin to Mesh works by using the UV map to determine how the image or texture should be applied to the mesh. Each vertex on the mesh is "pinned" to a corresponding point on the UV, which allows the a mesh to conform to the shape of another mesh.
Add a Pin to Mesh Component
In the Hierarchy panel, select an object and locate its components in the Inspector panel. Click + Add component, go to 3D, and then select Pin to Mesh.
![add pin to mesh](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/add_pin_to_mesh-b442dbb06fdae6dd17dc5b8be83d09f4.png)
Properties
![pin to mesh properties](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/pin_to_mesh_properties-0997d7d0225e1c7d265df2776d52c8af.png)
Property | Description |
---|---|
Target | Attach an object to a targeted mesh surface for precise positioning. |
UV | Adjust the texture orientation of an object's surface to match the mesh surface. |
Orientation | Align an object with a targeted mesh surface by adjusting its rotation. |
Vertex Normal | When using Orientation with Position and Direction, use Vertex Normal for rotation pinning. |
Offset Space | Adjust the offset of the attached object. |
Offset Position | Precisely position an object relative to the targeted mesh surface. |
Offset Rotation | Adjust the rotation of an object relative to the targeted mesh surface. |