# Geometry Nodes: how to compute a difference between every point position and a vector?

I'm trying to connect some points to a "target" object.

I managed to create a GN setup to connect a curve between two points, then i've instanciated that setup on points :

But now, I would like to join all the curves on the empty that controls the animation.

I guess I have to compute a target position that would be computed based relatively on each point position.

How can I do that ? Here's my actual blend.

Thanks !

Since all your curves are an instance of a single curve, you can't subsequently change them the way you'd like once they've been instantiated.

That is, you can change the mesh at any time, of course, but you want access here to the individual parameters you have available when you create a curve.

Therefore, to be able to edit the instances afterwards, you would have to use the Realize Instances node.

However, this does not work with your curve of the type Quadratic Bezier. If you use this curve with Realize Instances, you have the single splines, but many points instead of beginning, middle and end.

Therefore, you would have to create a simple curve before instantiating, then instantiate, turn the instances into individual curves using the Realize Instances node, and then start editing the curves there.

Since you have curves with two points (start, end) at the beginning, you can divide them into several parts with the Subdivide node and change the points as you like.

In this example, I set the endpoints all to the same position, and apply an offset to the middle points.

This example translated into Geometry Nodes looks like this:

And here is the blend file:

• +1 nice one!!!! Commented Apr 6, 2022 at 15:27
• Thanks for this great explanation! So, if I understand correctly, instances will always behave as… instances, even if, in this case, my instance is a node group (which has a « target » param) ? So when I want to customize those instances, I have to Realize them ? Commented Apr 6, 2022 at 18:18
• Yes, instances are a "copy" of an object as long as you don't separate the copies with "Realize Instances". But in Blender language, it should correctly be called "Linked Duplicate", not "Copy". Although instantiated objects have their own transformation, the object data are identical to each other. Commented Apr 7, 2022 at 8:49

if you change your node setup like this:

you get this:

Note: if you ever change the resolution of your curve, you have to adapt the 17 in modulo and the 16 in divide. But i think you know how to do that... ;)

and of course you can then give the curve again some bevel:

then it looks better:

little explanation:

I let the curve be as it was, but i didn't gave a profile circle here:

by that i can access and change your curve with resolution 16.

I move the endpoint of the curve to the emptys location and all other points in between by the mix node with the factor according to their position. So the nearest to the empties point will get 15/16 of his curve position to the empty, the most far away get 0/16 of the mix of curve position to the empty -> that's the curve point itself. It's a cheap trick, it won't make your curve nicer, but maybe you are satisfied with that.