You have the right idea: sample the nearest point on the curve, get the tangent of that point, and then align the rotations of your instances to that vector. Let's see how we could manage that here.
First of all, just for convenience, I took the liberty to organize and simplify your setup. For example, I re-oriented the axes of your goblin figurine so it stands upright. If you don't wanna do that, you could also simply use a Transform Geometry
node to do the necessary rotations inside Geometry Nodes:
As you've already pointed out, Set Position
uses the indices of the points to place the instances, and that index order doesn't necessarily correlate with the order of the indices of the closest curve points we want them to align to, thus, there's no need to use Set Position
at all—we can directly instance on the vertices. Rest of the setup we construct going backwards:
We want to sample the nearest point. Sample Nearest
—Point gets us the index of the nearest point to our vertices, and Sample Index
enquires that point about a certain value—in this case a Curve Tangent so we can Align Euler to Vector
. These two sampling nodes only work with meshes and point clouds though, not curves, so we need to convert Curve to Mesh
first. However, mesh vertices do not have a Curve Tangent
value, so to not lose that information, we use a Capture Attribute
before the conversion, propogating those values from the control points of the curve to the points (vertices) of the mesh. We feed this captured attribute into the Sample node to enquire about it later in the tree. Since we're not instancing the goblins on the curve, we're not trying to match the number of control points to the number of vertices anymore so technically we don't need to use Resample Curve
either, but more control points means more granular sampling of values, so resampling a decent amount is still desirable. Just using the Evaluated mode was satisfactory to me here, but you can use Count or Length to get slightly different results.