Using "Copy Location Constraints" to drive position of an Object. How to get avarage position?

Hello,

I would like to fade/blend through some predefined positions.

My setup:
I put some empty-objects in scene, and a new camera. This camera has attached “copy location constraint” for each empty object.
Now I would like to position my camera depenting on influence value in constraint, but seems, only last one constraint is used to drive camera’s position.

How do I get the avarage position depending on all influence values?

Is there another approach?

Thank you and best Regards.

You have to adapt the influence setting.
If you have two empties you have to set both influence sliders to 0.5 to put your camera in the center of the two objects
If you have three empties you have to set all three sliders to 0.33.
If you have four you have to set all sliders to 0.25.

As you can see it is a bit clunky but I don’t think there is a way to automatically average the influence.

Suggestion : You can use geometry nodes . For object info node you have a position output. You can add all the objects positions and then divide by the number of object.; That would provide real time the average position of your collection of object… I have not tried this but it should work out. I refer to Blender 3.0 latest release…

Yes, I just tried it with geonodes as well.
For certain scenarios it is probably quite usable.

2 Likes

Big hammer for a so little ant… :slight_smile:
your first solution is more suitable…

1 Like

Yes. The only real advantage is that it automatically averages out all the influences, so this might be less hassle when dealing with many control objects.
But with only 3 or 4 then clearly the first solution is better.

More Hammering on it.

blend 3.1 file

pos_drivers_with_Custom_Propertie.blend (852.1 KB)

2 Likes

You should know that drivers in general perform much less well than constraints, for such a simple thing I’d use constraints with varying influence

1 Like

Thanky you very much!
I will stick to the first approach, using constraints, as they seem to be the more intuitive way to realize.
Mixing positions, like skuax told, seems to be a good suggestion too! Maybe I will follow this route in another project.
I am totally new to blender and struggeling with driver editor and entering my expressions within one line.

best Regards

It was more a joke with @Lumpengnom … if you read back the posts