Find world position of a vertice on a skinned mesh renderer

How do I get the position of one of the vertices in a skinned mesh renderer, that factors in the meshes current shape and location?

I want to have a human skinned mesh that when she is hit by a small object, it sticks to her at the exact closest vertices

I have all the other coding figured out, but I need to know how to get a vertices location and how to interpret it’s world space location from that.

Thanks all!

I’m sure you have figured it out, but for anyone else who comes across this thread:

The coordinate space of the vertices on a mesh are pretty much in local object space, so you need to transform those points from local object space to world space by using Transform.TransformPoint on the transform your MeshRenderer or SkinnedMeshRenderer is attached to.

SkinnedMeshRenderer vertices are described in the linked thread too, for BakeMesh you can just create a new mesh and do it like this:

var temporaryMesh = new Mesh(); // Or reuse this for subsequent baking operations
Vector3[] vertices = temporaryMesh.vertices;