2
$\begingroup$

Using geometry nodes to snap / move two vertex points from different objects together.

I can get the vector of the index of the two vertex points on the objects I want to move which is at index 224 and 216

1st) Static object:

img 1

2nd) Object to move:

img2

It should look something like this: (yes I know I can translate the object using a transform node but snapping objects together using their index is much more powerful and exact)

img 3

I subtract the vectors from each other but the two objects don't snap together or display correctly.

My logic:

  1. Get vector of vertex of static object
  2. Get vector of vertex of object to move
  3. Minus the vectors of the vertex then move the object.

img4

See attached file.

$\endgroup$

2 Answers 2

3
$\begingroup$

I am not sure what you want to do here, but your question should be solved with the following answer:

enter image description here

Get the two positions of the desired points with Transfer Attribute and plug the integer directly there.

Then calculate the direction vector between the two positions and use this vector as offset in the node Set Position.

If you have the correct direction vector and do not move all points to a single position, all points will be moved evenly with the given vector.

...Also, you would have to swap the values for the index (just a guess).

$\endgroup$
1
  • $\begingroup$ Thanks looks like I was overthinking it a bit and had some connections wrong / extra connections not needed. $\endgroup$
    – Rick T
    Aug 19, 2022 at 9:45
4
$\begingroup$

Logic's OK. If you don't want all the points to go to the same place, you're offsetting them, rather than setting their position:

enter image description here

Here with the star modified, source index 4, and target index 29:

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .